Audio Authoring and Compositing

ABSTRACT

Some embodiments provide an audio authoring method that provide a set authoring tools for specifying rules for combining sections of a first song to generate a second song. The set of authoring tools allow an array of cells to be arranged in first and second directions, and allow each body section to be associated with one set of cells that are arranged in the first direction and another set of cells that are arranged in the second direction. At each cell that belongs to one set of cells arranged in the first direction for a first body section and another set of cells arranged in the second direction for a second body section, the set of tools also allow the user to specify whether the second body section is allowed to follow the first body section. Some embodiments provide a method for compositing audio. The method receives (1) several song sections, and (2) for each particular song section, a priority value and a set of succession rules that identify a set of song sections that cannot follow the particular song section. Based on the priority values, the method adds the song sections to the first song until a desired first-song duration is reached without exceeding the duration or until all song sections have been examined for adding to the first song. The method then analyzes a sequence of song sections in the first song to remove any song section that violates a succession rule.

BACKGROUND

With the proliferation of digital cameras and mobile devices withdigital cameras, people today have more digital content than everbefore. As such, the need for tools for presenting and viewing thisdigital content has never been greater. Unfortunately, many of the toolstoday require users to manually organize their content. Also, many ofthese editing tools require users to manually select their content forediting and to manually edit their content. Because of this manualapproach, most digital content simply resides in vast digital medialibraries waiting for the rare occasion that they can be manuallydiscovered, and in even rarer occasions, painstakingly edited to be partof composite presentations.

SUMMARY

Some embodiments provide a media compositing method with several novelfeatures. In some embodiments, this method is performed by anapplication that executes on a computing device that stores mediacontent pieces (e.g., videos, still images, etc.), and/or that hasaccess through a network to media content pieces (MCPs) stored on othercomputing devices. The method of some embodiments performs an automatedprocess that (1) analyzes the MCPs (e.g., analyzes the content and/ormetadata of the MCPs) to define one or more MCP groups, and (2) producesa user interface (UI) layout that identifies the defined MCP groups asgroups for which the method can display composite presentations (e.g.,video presentations).

To define the MCP groups, the method of some embodiments uses one ormore media grouping templates (templates). A template in some embodimentis defined by reference to a set of media matching attributes. Themethod compares a template's attribute set with the content and/ormetadata of the MCPs in order to identify MCPs that match the templateattributes. When a sufficient number of MCPs match the attribute set ofa template, the method of some embodiments defines a template instanceby reference to the matching MCPs.

In some embodiments, the method can define multiple template instancesfor a template. For instance, in some embodiments, the templates include(1) location-bounded templates (e.g., videos and/or photos capturedwithin a region with a particular radius), (2) time-bounded templates(e.g., videos and/or photos captured within a particular time rangeand/or date range), (3) time-bounded and location-bounded templates(e.g., mornings at a beach), (4) content-defined templates (e.g., videosand/or photos containing smiles), and (5) user-metadata based templates(e.g., MCPs from albums created by the user, MCPs shared by a user withothers, MCPs having particular user-defined metadata tags, etc.).

In these embodiments, one or more of these templates might result inmultiple template instances. For example, a time and location-boundedtemplate might be defined in terms of (1) a time range tuple specifying12 pm to 4 pm, (2) a day range tuple specifying Sunday, and (3) alocation tuple specifying a region that is not associated with the homeor work location of a user of the device executing the application. Forthis template, the method might identify multiple template instancesthat include different sets of MCPs that are captured at differentlocations on Sunday afternoons, with different template instancescorresponding to different regions. In some embodiments, thetime-bounded attributes require the MCPs to be captured within a certaintemporal range of each other (e.g., all MCPs captured from 12 pm-4 pm onSaturdays).

After defining multiple template instances, the method in someembodiments generates a UI layout that includes an arrangement of a setof summary panes for some or all of the template instances. In someembodiments, the UI layout concurrently displays the summary panes ofonly a subset of the defined template instances. For example, in someembodiments, the method computes a score for each defined templateinstance, ranks the defined template instances based on the generatedscores, and then generates the UI layout based on the rankings. In someembodiments, the UI layout concurrently shows summary panes for only acertain number of the highest-ranking template instances. In otherembodiments, the UI layout concurrently show summary panes for onlytemplate instance with generated scores that exceed a certain minimumthreshold. The method in some of these embodiments provide controls forallowing a user to view summary panes for other defined templateinstances that the method does not initially display with other summarypanes in the generated UI layout.

In different embodiments, the method generates the scores for thetemplate instances differently. In some embodiments, a templateinstance's score is based on (1) contextual attributes that relate tothe time at which the UI layout is being generated and/or displayed, and(2) quality and/or quantity attributes that relate to quality and/orquantity of the MCPs of the template instance. Different contextualattributes can be used in different embodiments. Examples of contextualattributes include (1) time, (2) location of the device, (3) location offuture calendared events stored on, or accessible by, the device, (4)locations derived from electronic tickets stored on the device, etc.

In some embodiments, the contextual attributes are used to derivetemplate-instance scores in order to identify template instances thatwould be relevant (interesting) to a user (e.g., at the time that thegenerated UI layout will be displayed). For instance, in someembodiments, the method can identify a future location of the device'suser from the time and location of an event scheduled in a calendarapplication, or specified by an electronic ticket application, executingon the device. As the time approaches to the time of the calendared orticketed event, the method increases the score of a template instancethat is associated with the location of the event based on an assumptionthat the user would want to see MCPs previously captured at thatlocation.

As mentioned above, each template instance's score in some embodimentsalso depends on the quality and/or quantity attributes of the MCPs ofthe instance. Some embodiments account for quantity of MCPs in aninstance based on an assumption that a larger quantity signifies ahigher level of interest in template instance. For example, a templateinstance that has a lot of photographs in one location on one particularday would typically signify that at an interesting event took place atthat location on that particular day and the user would hence be moreinterested in seeing the photos form that event.

However, in some embodiments, the method discards duplicative or nearlyduplicative MCPs (e.g., keeps only one photo when multiple identical ornearly identical photos exist) from a template instance or before theirinclusion in the template instance because often having multiple suchphotos does not lead to an interesting composite presentation. On theother hand, the method in some cases maintains multiple photos from aburst-mode sequence so that the composite presentation can provideinteresting burst-mode photo treatments. In some embodiments, the methodalso discards certain MCPs that are deemed not to be interesting (e.g.,pictures of receipts, screenshot photos, etc.) or not to be useful(e.g., very blurry photos, etc.). These MCPs are filtered out in someembodiments before the template instances are created. In other words,these MCPs are never associated with template instances in someembodiments.

In some embodiments, each template instance's score accounts for thequality of the instance's MCPs based on an assumption that templateinstances with better content will result in better-generated compositepresentations and thereby in composite presentations that are moreinteresting to the viewer. Different embodiments score the MCPs based ondifferent criteria. For instance, some embodiments generate an intrinsicscore for an MCP based on one or more of the following MCP attributesand/or metadata: focus, blur, exposure, camera motion, voice content,face content, user input and/or behavior (e.g., user tags, user'sinclusion in albums, user sharing with others, etc.). Some embodimentsalso score specialty MCP types (e.g., burst-mode photos, slow-motionvideos, time-lapsed videos, etc.) higher than other MCP types (e.g.,still photographs). Some embodiments also score MCPs that are capturedat locations that are not associated with the device user's home or workhigher than MCPs captured at home or work.

In some embodiments, the method also computes an extrinsic score foreach MCP in a template instance that quantify the temporal and visualdistances between two successive MCPs in a presentation order, whichdefine how the MCPs are to be presented in the composite presentation ofthe template instance. The method then uses this score to define anorder for selecting a subset of the MCPs for the composite presentation.For instance, some embodiments use the computed extrinsic scores alongwith the computed MCP intrinsic scores to select highest scoring MCPs(i.e., best quality MCPs) that provide the most visually uniquecombination of MCPs. The extrinsic score in some embodiments is atime-and-difference distance between neighboring MCPs in thepresentation order. In some embodiments, the time-and-differencedistance is a weighted aggregation (e.g., sum) of a time distance and adifference distance between the two MCPs.

As mentioned above, the method in some embodiments generates thearrangement of the summary panes for some of the generated templateinstances based on the scores computed for the template instances. Thesummary panes display information about the template instances. In someembodiments, a template instance's summary pane includes one or morethumbnails of one or more MCPs of the instance, and a title. Someembodiments generate the thumbnails from the highest scoring MCPs of theinstances. Some embodiments also derive the title for an instance's panefrom MCP attributes (e.g., MCP metadata such as location, or MCP contentsuch as smiles, etc.) that associates the MCPs into one templateinstance.

After a user selects the summary pane for a template instance, themethod in some embodiments generates the definition of the compositepresentation, and then renders the composite presentation from thisdefinition. In some embodiments, the presentation definition includesthe identity of the instance's MCPs that are included in thepresentation, the presentation order for the included MCPs, and the listof edit operations (e.g., transition operations, special effects, etc.)that are to be performed to generate the composite presentations fromthe MCPs.

In some embodiments, the method generates some or all of the MCPs thatare included in a template instance's composite presentation from theMCPs of the template instance. For instance, multiple MCPs of thetemplate instance can be still photos. For some or all of these stillphotos, the method generates a video clip in the composite generation byspecifying a Ken Burns effect for each of these photos. Also, from avideo clip MCP of a template instance, the method can extract one ormore video clips to include in the composite presentation. Similarly,from an MCP that is a burst-mode sequence, the method can extract one ormore still photos of the sequence and/or one or more Ken-Burns typevideo clips for one or more of the still photos of the sequence. Manyother examples of deriving the composite-presentation MCPs from atemplate instance's MCPs exist.

Instead of defining the composite presentation for a template instanceafter a user selects the summary pane for the template instance in theUI layout, the method of some embodiments defines the compositepresentation before the UI layout is generated. In some of theseembodiments, the method generates a score for each defined compositepresentation, and then uses the generated scores for all of the definedcomposite presentations to define and arrange the UI layout Forinstance, in some embodiments, the method uses the generatedcomposite-presentation scores to identify the subset of compositepresentations that should initially be concurrently represented on theUI layout, and to identify the order of summary panes for thesecomposite presentations on the UI layout.

In some of these embodiments, the composite presentations are renderedafter the user selects their respective summary panes on the UI layout.Other embodiments render the composite presentations before generatingthe UI layout. One of ordinary skill will realize that other embodimentsperform these operations in different sequences. For instance, someembodiments define a portion of a composite presentation before the UIlayout is generated, and then generate the rest of the definition of thecomposite presentation after the UI layout is generated.

The composite presentation generation of some embodiments has severalnovel features. For instance, the method of some embodiments generatescomposite presentations by selecting a blueprint for the compositepresentation. In some embodiments, the blueprint describes the desiredtransitions, effects, edit styles (including pace of the edits), etc.Blueprint can also specify the desired type of presentation, which canthen influence the type of MCPs included or emphasized in the compositepresentation. For example, one blueprint might specify highlights as thedesired type of presentation, while another blueprint might specifyretrospective as the desired type. For highlights, the method'scomposite generation would select the best MCPs that are representativeof the MCPs of the template instance. For retrospectives, the method'scomposite generation would might select the MCPs that are notnecessarily of the whole set of MCPs of the template instance.

For a template instance, the blueprint in some embodiments is associatedwith the template of the template instance. Alternatively, orconjunctively, the blueprint in some embodiments is associated with amood that the method automatically picks for the composite presentation.In some embodiments, the mood is an adjective that describes the type ofcomposite presentation. Examples of mood include extreme, club, epic,uplifting, happy, gentle, chill, sentimental, dreamy, etc. In someembodiments, the method automatically picks the mood for a compositepresentation based on the type and/or duration of media in the templateinstance, content analysis on this media (e.g., detection of high motionvideo), and detected user-mood preferences. Also, in some embodiments,the method allows the mood to be modified for a composite presentation.In some of these embodiments, the method re-generates the compositepresentation for a template instance after the user modifies the moodfor a generated composite presentation. Some embodiments allow the userto view the mood for a template instance represented by a summary paneon the generated UI layout. If the user modifies the mood for therepresented template instance, the method generates the compositepresentation for this template instance based on the user change.

The composite presentation generation of some embodiments automaticallyspecifies the duration for the composite presentation. In some of theseembodiments, the method specifies the duration based on the amount ofhigh-quality, unique content in the template instance and the blueprint.For instance, after defining the above-described selection order basedon the time-and-difference distance values, the method selects the MCPsin the template instance up to the position in the selection order wheretwo successive MCPs are within a certain distance of each other (e.g.,within 0.25 unit time-and-difference distance of each other). Theblueprint's specified parameters (e.g., parameters specifying idealduration for the MCPs) along with the selected MCPs determine thedesired duration of the composite presentation. In some embodiments, theblueprint might also specify how the MCPs should be selected, e.g., byspecifying selection criteria (such as degree of difference), specifyingthe manner for computing the time-and-difference distance values arecalculated, etc.

The method of some embodiments allows the user to modify a presentationduration that the method initially computes. For instance, in someembodiments, the user can modify the presentation duration after beingpresented with a rendered composited presentation. Alternatively, orconjunctively, the method allows the user to view and modify thepresentation duration in the generated UI layout (e.g., as part of theinformation provided by a template instance's summary pane), withouthaving to first view the rendered composite presentation with thisduration.

In some embodiments, the composite presentation generation has novelmedia compositing operations, novel song compositing operations, andnovel interplay between the media and song compositing operations. Themethod of some embodiments uses a constrained solver that generates thecomposite presentation definition by exploring different manners forcombining the MCPs of a template instance based on (1) a set ofconstraints that limit the exploration of the solution space, and (2)metadata tags that specify content characteristics (e.g., for a photo,or for ranges of frames of a video). Examples of constraints includeduration constraints (e.g., ideal, minimum and maximum durations foreach MCP type) and positional constraints (e.g., one MCP type cannot beplaced next to another MCP type).

In exploring the solution space to find an optimal solution thatsatisfies the constraint and meets one or more optimization criteria,the constrained solver in some embodiments preferentially costssolutions that use MCPs that are highly ranked in the selection order.Also, in finding the optimal solution, constrained solver in someembodiments (1) identifies different portions of the template instanceMCPs (e.g., different segments of the video clips, etc.) based on themetadata tag ranges, and (2) explores solutions based on theseidentified portions.

In some embodiments, the solver discards MCP segments from an identifiedsolution that are smaller than a certain size. The solver in someembodiments also explores whether an MCP segment in an identifiedsolution should be split into smaller segments in order to delete one ormore ranges in the middle of the segment. In some of these embodiments,the solver restarts its search for a solution after deleting smallerresulting segments and/or splitting MCPs into smaller segments.

In some embodiments, the media compositor also specifies Ken-Burnseffects for still photos in order to define video presentations for thestill photos. The media compositor in some embodiments specifies specialtreatments for other types of image content (such as burst-modesequences, slow-motion sequences, time-lapse sequences, etc.) thatresult in the generation of a video sequence for this type of content.By only using extracted segments of MCPs and by specifying specialtreatment effects for photos and other type of content, the mediacompositor generates MCPs for the composite presentation from the MCPsof the template instance.

As mentioned above, the media compositor in some embodiments computesthe ideal duration for the composite presentation based on the selectionorder that it defines using the time-and-difference distance values. Insome of these embodiments, the media compositor provides the idealduration to the song compositor. The song compositor then generates acomposite song presentation (to accompany the composite mediapresentation) that has the ideal duration.

In some embodiments, the song compositor generates the composite songpresentation by identifying a sequence of audio segments and definingedits and transitions between each pair of audio segments in thesequence. The audio segments are part of one song in some embodiments.In other embodiments, they can be part of two or more songs. These audiosegments are referred to as body segments to signify that they are partsof another song. In some embodiments, body segments are assigned apriority value and a section, and within each of their respectivesections, are assigned an order. These values are then used to insertthe body segments in a dynamically composited song.

In some embodiments, the song compositor also selects an ending segmentfrom several candidate ending segments for the composite songpresentation. The song compositor in some of these embodiments can alsoselect a starting segment from several starting segments for thecomposite song presentation. An editor defines the body, starting andending segments from one or more songs by using the audio authoringtools of some embodiments.

To ensure that the segments are properly arranged in the composite songpresentation, the song compositor of some embodiments uses (1) insertionrules that specify how audio segments can be inserted in an audiosequence, and (2) sequence rules that ensure that the inserted audiosegments can neighbor other segments in the sequence. In someembodiments, the song compositor iteratively inserts body segments intoa candidate audio sequence by stepping through the body segments basedon their assigned priority values, and inserting the body segments intothe candidate audio sequence based on their duration and the insertionrules. In some embodiments, the insertion rules specify (1) that a bodysegment that belongs to a subsequent second section cannot be insertedbefore a body segment that belong to an earlier first section, and (2)that body segments that belong to the same section be placed next toeach other based on their order in their respective section.

The song compositor of some embodiments then uses the sequence rules tovalidate the body segment arrangement in the audio sequence. Thisvalidation entails ensuring that the placement of no two neighboringsegments in the audio sequence violates a sequence rule. When aneighboring segment pair violates a sequence rule, the compositorremoves the segment with the lower priority to cure the violation insome embodiments.

In some embodiments, these sequence rules are embedded in a jump tablethat has multiple rows and columns, and each audio segment is associatedwith one row and one column. In some embodiments, each starting orending segment is also associated with at least one row or one column.Each jump table cell then specifies whether the two segments that areassigned to that cell's row and column are allowed to follow each otherin an order specified by the row and column assignment. An editor usesthe authoring tool of some embodiments to specify the jump table and itsattributes for the body, starting and ending segments that the editordefines. At runtime, the song compositor then uses this jump table toautomatically define a song for a duration specified by the mediacompositor.

In some embodiments, each jump table cell also specifies whether atransition is required at the transition between the two segments. Thejump table also specifies (1) a priority value for each body segment and(2) an identifier for indicating whether the body segment can be slicedduring the song compositing. In some embodiments, the song compositorinserts body segments in a presentation order based on the segmentpriority values and based on a set of insertion rules, until aparticular duration is reached. This duration in some embodiments is theideal duration provided by the media compositor minus the duration ofthe longest ending segment. After arranging the body segments, the songcompositor adds an ending segment, and when the audio sequence is stillshorter than the desired duration, a starting segment if one segment isavailable that would not make the sequence duration exceed the desiredduration.

In some embodiments, the media compositor and song compositor haveseveral novel interactions. The first is the media compositorautomatically generates a desired presentation duration, and the songcompositor dynamically generates a definition of a composite songpresentation based on this duration, as described above. Another novelinteraction is that in some embodiments the song compositor provides thelocation of the ending segment, and/or location of a stinger in theending segment, to the media compositor so that the media compositor canalign the start of the last video or image segment with the endingsegment or stinger in this segment. In some embodiments, the video andsong compositors also synchronize fade-out effects that they apply totheir respective presentations with each other.

Also, in some embodiments, the media compositor performs post-processingto align edit points in the composite media to certain audiblydiscernable transition locations in the composite song. These locationsin some embodiments include location of beats, locations of onsets,locations of segment boundaries, and location of ending-segment stingerin the composite definition. An audio onset corresponds to the beginningof a musical note at which the amplitude rises from zero to a peak. Abeat is the rhythmic movement at which the song is played.

In some embodiments, the media compositor directs the song compositor toidentify one or more audibly discernable transition locations in thecomposite song near a particular time in the presentation. In some ofthese embodiments, the song compositor returns (1) a list of suchlocation that are near the particular time, and (2) a priority for eachof these locations. The media compositor then uses this list oftransitions to align an edit point in the composite media's definitionto a transition location based the specified priority value(s) and thedegree to which the media edit has to be moved to reach the transitionlocation.

In some embodiments, the compositing application that implements theabove-described method executes on a mobile device. This applicationonly requires a user of a mobile device to capture photos and videos atdifferent events. Once the user has captured photos and videos, theapplication can automatically group the content that was capturedtogether, associate the group content with a location or event, presenteach defined group to the user, and to display a composite presentationfor the group upon the user's selection of the group. For instance, whena user goes to an event (e.g., baseball game) and takes pictures andvideos at the stadium, the mobile device can automatically group thesepictures and videos, create a composite presentation from them, andprovide the composite presentation to the user after the user leaves thegame. Similarly, photos and videos from vacations (e.g., trips toHawaii) can be grouped together, put in a composite presentation, andprovided to users after their vacations ends.

BRIEF DESCRIPTION OF DRAWINGS

The novel features of the invention are set forth in the appendedclaims. However, for purposes of explanation, several embodiments of theinvention are set forth in the following figures.

FIG. 1 conceptually illustrates a media-compositing application of someembodiments.

FIG. 2 illustrates an example of a layout generated by a layoutgenerator.

FIG. 3 illustrates an example of arranging template instance summarypanes in some embodiments.

FIG. 4 illustrates a process of operations performed by themedia-compositing application of FIG. 1.

FIG. 5 illustrates an example of the media-compositing application userinterface of some embodiments.

FIG. 6 illustrates an example of allowing a user to change content forthe composite presentation.

FIG. 7 illustrates an authoring process for dividing a song intomultiple body segments, one or more starting segments, and one or moreending segments.

FIG. 8 illustrates multiple operational stages of a user interface of anauthoring application of some embodiments.

FIG. 9 illustrates directing the authoring application to generate anddisplay a jump table of some embodiments.

FIG. 10 illustrates an example of a jump table of FIG. 9 in more detail.

FIG. 11 illustrates a process that defines a jump table of the authoringapplication.

FIG. 12 illustrates architecture of a song compositor of someembodiments.

FIG. 13 illustrates a process that the song compositor of FIG. 12performs in some embodiments to dynamically composite a songpresentation.

FIG. 14 illustrates a process for iteratively inserting body segmentsinto a presentation sequence.

FIG. 15 illustrates an example of operation of the sequence generatorand sequence validator of FIG. 12.

FIG. 16 is an example of an architecture of such a mobile computingdevice.

FIG. 17 conceptually illustrates another example of an electronic systemwith which some embodiments of the invention are implemented.

DETAILED DESCRIPTION

In the following detailed description of the invention, numerousdetails, examples, and embodiments of the invention are set forth anddescribed. However, it will be clear and apparent to one skilled in theart that the invention is not limited to the embodiments set forth andthat the invention may be practiced without some of the specific detailsand examples discussed.

Some embodiments provide a media-compositing application thatautomatically organizes media content pieces (MCPs) that are stored on,and/or accessible by, a device into different groups, and produces auser interface (UI) layout that identifies the defined MCP groups asgroups for which the application can display composite presentations(e.g., video presentations). In some embodiments, the application groupsthe MCPs by performing an automated process that is not triggered by auser request to group the MCPs. To group the MCPs, the application'sautomated process uses multiple grouping templates (templates), witheach specifying a set of media attributes that are to be compared withthe MCP content and/or attributes to group the MCPs.

In some embodiments, the generated UI layout includes summary panes forsome, but not all, of the defined MCP groups. For instance, in someembodiments, the UI layout at any given time includes summary panes forthe MCP groups that would be contextually most relevant to a user of thedevice at that time. However, in some embodiments, the applicationprovides controls for allowing a user to view summary panes for otherdefined MCP groups that the application does not initially display withother summary panes in the generated UI layout. When a user selects asummary pane for an MCP group, the application displays a compositepresentation that it generates from the group's MCPs without receivingany other user input.

FIG. 1 illustrates one such media-compositing application 100. Thisapplication executes on a device that stores MCPs (e.g., videos, stillimages, etc.), and/or has access through a network to MCPs stored onother computing devices. This device is a computer (e.g., server,desktop or laptop), or a mobile device (such as a smartphone or tablet).As shown, this application includes a collection generator 105, a layoutgenerator 110, a context identifier 115, a scoring engine 120, a mediacompositor 125, a song compositor 130, and a rendering engine 135. Toperform their operations, these modules of the application access mediacontent storage 140, template storage 145, media collection storage 150,audio storage 155, composite-video storage 160, composite-audio storage165.

In some embodiments, the collection generator 105 and layout generator110 perform an automated process that (1) analyzes the MCPs (e.g.,analyzes the content and/or metadata of the MCPs) to define one or moreMCP groups, and (2) produces a user interface (UI) layout thatidentifies the defined MCP groups as groups for which the applicationcan display composite presentations (e.g., video presentations). Inperforming their operations, these modules in some embodiments use thescoring engine 120 and the context identifier 115.

More specifically, to define the MCP groups, the collection generator105 in some embodiments uses one or more media grouping templates(templates) in the template storage 145 to try to associate each MCPstored in the media content storage 140 with one or more templateinstances. In some embodiments, the media content storage 140 is a datastorage (e.g., a database) of the device that executes the application.In other embodiments, some or all of this storage 140 resides on aseparate device (e.g., another computer, server, mobile device, etc.).

In some embodiments, a template in the template storage 145 is definedby reference to a set of media matching attributes. The collectiongenerator 105 compares a template's attribute set with the contentand/or metadata of the MCPs in order to identify MCPs that match thetemplate attributes. When a sufficient number of MCPs match theattribute set of a template, the application of some embodiments definesa template instance by reference to the matching MCPs, and stores thistemplate instance in the media collection storage 150. In someembodiments, a template instance includes a list of MCP identifiers thatidentify the MCP's that matched the instance's template attribute set.

In some embodiments, the collection generator 105 can define multipletemplate instances for a template. For instance, in some embodiments,the templates include (1) location-bounded templates (e.g., videosand/or photos captured within a region with a particular radius), (2)time-bounded templates (e.g., videos and/or photos captured within aparticular time range and/or date range), (3) time-bounded andlocation-bounded templates (e.g., mornings at a beach), (4)content-defined templates (e.g., videos and/or photos containingsmiles), and (5) user-metadata based templates (e.g., MCPs from albumscreated by the user, MCPs shared by a user with others, MCPs havingparticular user-defined metadata tags, etc.).

The collection generator 105 stores the definition of the templateinstances that it generates in the media collection storage 150. In someembodiments, the generator repeats its grouping operation in order toupdate the template instance definitions in the media collection storage150. For instance, in some embodiments, the generator repeats itsgrouping operation periodically, e.g., every hour, six hours, twelvehours, twenty four hours, etc. Conjunctively, or alternatively, thegenerator 150 in some embodiments performs its grouping operationwhenever the application opens and/or based on user request.

Also, in some embodiments, the collection generator 105 performs itsgrouping operation each time a new MCP is stored, or a certain number ofMCPS are stored, in the media content storage 140. For example, in someembodiments, the application 100 executes on a mobile device thatcaptures a variety of image content data (e.g., still photos, burst-modephotos, video clips, etc.). Each time the mobile device captures an MCP(e.g., a photo, a video clip, etc.), the collection generator 105 insome embodiments tries to associate the captured MCP with one or moretemplate instances, provided that the application is running in theforeground or background at that time.

Based on template definition, layout generator 110 in some embodimentsgenerates UI layouts that identify the defined template instances as MCPgroups for which the application can display composite presentations(e.g., video presentations). At any given time, the layout generator 110of some embodiments generates a UI layout that identifies a subset ofthe defined template instance that would be contextually relevant to auser of the device at that time. As further described below, this isbased on the contextual attributes provided by the context identifier115 and template instance scores computed by the scoring engine 120.

FIG. 2 illustrates an example of a UI layout 200 generated by the layoutgenerator 110. In this example, the UI layout is displayed on a displayscreen of a mobile device 100 that executes the application of someembodiments. Also, this example is illustrated in terms of four stages202-208 that show different aspects of this UI layout presentation.

As shown, the UI layout concurrently displays several summary panes 205for a subset of template instances that are defined at a particulartime. Each summary pane 205 displays information about its associatedtemplate instance. In this example, a template instance's summary paneincludes a title plus one or more thumbnails of one or more MCPs of theinstance. The layout generator 110 in some embodiments derives a summarypane's (1) title from the attribute set (e.g., MCP metadata such aslocation, or MCP content such as smiles, etc.) of the pane's instance,and (2) thumbnails from one or more of the better quality MCPs of thepane's instance. In some embodiments, the scoring engine 120 generates ascore for each MCP to quantify its quality. This scoring will be furtherdescribed in concurrently filed U.S. patent application entitled“Synchronizing Audio and Video Components of an Automatically GeneratedAudio/Video Presentation,” with Attorney Docket Number APLE.P0633, whichis incorporated herein by reference.

As further shown, the UI layout 200 has two different display sections210 and 215. The first display section 210 displays summary panes fortemplate instances that are deemed to be contextually relevant to a userof the device at that time, while the second display section 215displays summary panes for different categories of template instances.In this example, two or more template instances belong to one categorywhen they are derived from one media grouping template. Also, in thisexample, each category is identified by a category heading at the top ofthe summary panes for the template instances of that category. In thisexample, the categories are Holidays, Birthdays, Vacations, and Parks.

The first and second stages 202 and 204 of FIG. 2 illustrate that theuser can scroll through the summary panes in the first section 210 byperforming horizontal drag (left or right) operations, which are enabledby a touch-sensitive display screen of the mobile device 100. The secondand third stages 204 and 206 illustrates that the user can scrollthrough the summary panes in the second section 215 by performingvertical touch drag (up or down) operations.

The third and fourth stages 206 and 208 illustrate that the seconddisplay section 215 initially displays summary panes only for the betterquality template instances in each category. Specifically, the thirdstage 206 shows that the user can view all template instances createdfor a category by selecting a “See More” control 230 that appears abovethe summary panes for the Holidays category. The fourth stage 208 showsthat this selection causes the UI layout to expand the space for theHolidays category to reveal additional summary panes for additionalHolidays template instances.

Accordingly, in the example illustrated in FIG. 2, the UI layout notonly provides a first section that displays summary panes for templateinstances that are deemed to be contextually more relevant than templateinstances at a given time, but also limits the summary panes displayedin the second section to those that are the best ones in theirrespective categories. One of ordinary skill will realize that the UIlayout of FIG. 2 is just one exemplary UI layout design. Otherembodiments display, arrange, and/or nest the summary panes differently.Also, other embodiments provide different kinds of information for eachsummary pane.

To assess whether one template instance is contextually more relevantthan, and/or better than, another one template instance at a particulartime, the layout generator has the scoring engine 120 generates a scorefor each template instance, ranks the template instances based on thegenerated scores, and then generates the UI layout based on therankings. In some embodiments, the UI layout concurrently shows summarypanes for only a certain number of the highest-ranking templateinstances. In other embodiments, the UI layout concurrently show summarypanes for only template instance with generated scores that exceed acertain minimum threshold.

In different embodiments, the scoring engine 120 generates the scoresfor the template instances differently. In some embodiments, a templateinstance's score is based on (1) contextual attributes that relate tothe time at which the UI layout is being generated and/or displayed, and(2) quality and/or quantity attributes that relate to quality and/orquantity of the MCPs of the template instance. Different contextualattributes can be used in different embodiments. Examples of contextualattributes include (1) time, (2) location of the device, (3) location offuture calendared events stored on, or accessible by, the device, (4)locations derived from electronic tickets stored on the device, etc.

In some embodiments, the context identifier 115 periodically collectssuch contextual attributes from one or more services modules executingon the device. Examples of these service modules include locationservice modules, such as GPS modules, or other location modules (e.g.,frameworks) that generate the location data from multiple locationdetermining services. The service modules also include in someembodiments one or more location prediction engines that formulatepredictions about future locations of the device (1) based on eventsscheduled in a calendar application, or specified by an electronicticket application, executing on the device, and/or (2) based on pastlocations of the device (e.g., locations associated with regions inwhich the device previously stayed more than a threshold amount oftime). These services in some embodiments are framework level services.

In addition to, or instead of, periodically collecting such contextualattributes periodically, the context identifier 115 in some embodimentscollects these attributes on-demand based on requests from the layoutgenerator 110. The layout generator 110 passes the contextual attributesthat it receives to the scoring engine 120, which then uses theseattributes to derive template-instance scores in order to identifytemplate instances that would be relevant (interesting) to a user (e.g.,at the time that the generated UI layout will be displayed).

For instance, in some embodiments, the application can identify a futurelocation of the device's user from the time and location of an eventscheduled in a calendar application, or specified by an electronicticket application, executing on the device. As the time approaches tothe time of the calendared or ticketed event, the application increasesthe score of a template instance that is associated with the location ofthe event based on an assumption that the user would want to see MCPspreviously captured at that location.

FIG. 3 illustrates an example that illustrates how the layout generatorin some embodiments arranges the template instance summary panes basedon their contextual relevance. This example is illustrated in threeoperational stages 302-306 of the mobile device 100. The first andsecond stages 302 and 304 illustrate the user scrolling through the UIlayout 200 that has multiple summary panes in the first and seconddisplay sections 210 and 15. The second stage 304 illustrates that oneof summary pane categories towards the bottom of the second displaysection 210 is a category for vacation, and that one vacation summarypane relates to Maui Spring 2014. The first and second stages 302 and304 also show that the user is scrolling through the UI layout 200during these stages in the February of 2015.

The third stage 306 illustrates a UI layout 300 that the layoutgenerator generates in April 2015. In this UI layout 300, the layoutgenerator has moved the Maui Spring 2014 template instance to the firstdisplay section 210, in order to present this collection as one of thefeatured collections for which it can automatically generate a compositepresentation. The layout generator 110 does this in some embodimentsbecause it detects that an electronic ticketing application executing onthe device has an electronic ticket to Hawaii in the near future, andthen determines that it has previously defined a template instance thatincludes the media content from the last Maui trip.

In this example, the contextual attributes that the layout generatorpasses to the scoring engine, and that the scoring engine uses in itssoring calculation to generate a high score for the Maui collection,include the destination location of the ticket and the date of the trip.In some embodiments, only the destination location or only the date fromthe ticket might be enough to move the Maui collection up the generatedUI layout.

Also, in the example of FIG. 3, the Maui collection moves from thesecond display section to the first display section. In someembodiments, the layout generator emphasizes a summary pane by justmoving it up in the second display section, or by relocating it to adifferent position in the first display section. In addition, the layoutgenerator can redefine the UI layout at a much greater frequency thanthat illustrated in FIG. 3. For example, in some embodiments, the layoutgenerator refreshes the UI layout based on a predicted destination ofthe device as the device is traveling to a new destination (e.g., in acar). Alternatively, or conjunctively, the layout generator in someembodiments refreshes the UI layout when a user leaves a region, inwhich the user captured a number of MCPs with the camera of the mobiledevice that executes the application of some embodiments.

In some embodiments, each template instance's score can depend on thequality and/or quantity attributes of the MCPs of the instance. In someembodiments, the scoring engine 120 generates a score for a templateinstance that accounts for quantity of MCPs in the instance based on anassumption that a larger quantity signifies a higher level of interestin the template instance. For example, a template instance that has alot of photographs in one location on one particular day would typicallysignify that at an interesting event took place at that location on thatparticular day and the user would hence be more interested in seeing thephotos form that event.

However, in some embodiments, the collection generator 105 discardsduplicative or nearly duplicative MCPs (e.g., keeps only one photo whenmultiple identical or nearly identical photos exist) from a templateinstance or before their inclusion in the template instance becauseoften having multiple such photos does not lead to an interestingcomposite presentation. On the other hand, the collection generator 105in some cases maintains multiple photos from a burst-mode sequence sothat the composite presentation can provide interesting burst-mode phototreatments. In some embodiments, the collection generator 105 alsodiscards certain MCPs that are deemed not to be interesting (e.g.,pictures of receipts, screenshot photos, etc.) or not to be useful(e.g., very blurry photos, etc.). These MCPs are filtered out in someembodiments before the template instances are created. In other words,these MCPs are never associated with template instances in someembodiments.

In some embodiments, each template instance's score accounts for thequality of the instance's MCPs based on an assumption that templateinstances with better content will result in better-generated compositepresentations and thereby in composite presentations that are moreinteresting to the viewer. In different embodiments, the scoring engine120 scores the MCPs based on different criteria. For instance, in someembodiments, the scoring engine generates an intrinsic score for an MCPbased on one or more of the following MCP attributes and/or metadata:focus, blur, exposure, camera motion, voice content, face content, userinput and/or behavior (e.g., user tags, user's inclusion in albums, usersharing with others, etc.). Some embodiments also score specialty MCPtypes (e.g., burst-mode photos, slow-motion videos, time-lapsed videos,etc.) higher than other MCP types (e.g., still photographs). Someembodiments also score MCPs that are captured at locations that are notassociated with the device user's home or work higher than MCPs capturedat home or work.

In some embodiments, the collection generator 105 uses the MCP intrinsicscores to filter out some of the MCPs before or after their inclusion ina template instance. In these embodiments, the collection generator 105uses the scoring engine 120 to compute these scores. The scoring enginein some embodiments includes different scoring modules for computingdifferent types of scores, e.g., MCP scores, context-based instancescores, quality-based instance scores, quantity-based instance scores,etc. In some embodiments, one or more of these scores (e.g., MCP scores)are provided by one or more framework services of the device.Alternatively, or conjunctively, the framework services in someembodiments provide metadata tags that characterized differentcharacteristics of the MCPs, and these metadata tags are used to computesome or all of the scores.

In addition to the intrinsic scores, the scoring engine 120 computesextrinsic scores in some embodiments that express a quality of one MCPby reference to one or more other MCPs. For instance, in someembodiments, the scoring engine 120 computes extrinsic scores in orderto define a selection order for the MCPs in a template instance. In someof these embodiments, the computed extrinsic scores quantify thetemporal and visual distances between two successive MCPs in theselection order, as further described in the above-incorporated patentapplication.

When a user selects the summary pane for a template instance, the layoutgenerator in some embodiments directs the media compositor 125 and thesong compositor 130 to generate, for the selected template instance, thedefinitions of media and song presentations, which the rendering engine135 renders to produce a composite presentation for display. The mediacompositor 125 in some embodiments generates the definition of thecomposite media presentation from the MCPs of the template instance.

In generating this definition, the media compositor uses the selectionorder that was computed by using the extrinsic scores, to select only asubset of the MCPs of the template instance. For instance, after theselection order is defined based on the time-and-difference distancevalues, the video-compositor of some embodiments selects the MCPs in thetemplate instance up to the position in the selection order where twosuccessive MCPs are within a certain distance of each other (e.g.,within 0.25 unit time-and-difference distance of each other).

In some embodiments, this selection then allows the media compositor toautomatically define the duration of the composite presentation withoutany user input. For instance, some embodiments compute the duration asthe sum of the ideal duration of each MCP in the subset of selectedMCPs. In some embodiments, each MCP has an MCP type, and the MCP's idealduration is the ideal duration that is defined by its type. Thecomputation of the ideal presentation duration will be further describedin the above-incorporated patent application.

In other embodiments, the media compositor selects a duration for thecomposite presentation, and then uses the selection order to select theN highest ranking MCPs according to the selection order. Thus, theseembodiments use the duration is used to identify the MCPs to selectaccording to the selection order, while other embodiments use theselection order to define the presentation duration. However, given thatboth of these approaches in some embodiments rely on a selection that isbased on computed time-and-difference distance scores, they ensure thatthe MCPs that remain in the template instance are the best quality MCPsthat provide a visually unique combination of MCPs.

In some embodiments, the definition of the composite media presentationincludes the identity of the instance's MCPs that are included in thepresentation, the presentation order for the included MCPs, and the listof edit operations (e.g., transition operations, special effects, etc.)that are to be performed to generate the composite presentations fromthe MCPs. In some embodiments, the MCPs of the composite mediapresentation can be identical to the MCPs of the template instance, orthey can be MCPs that the media compositor derives from the instance'sMCPs.

For instance, multiple MCPs of the template instance can be stillphotos. For some or all of these still photos, the media compositor 125generates a video clip in the composite generation by specifying a KenBurns effect for each of these photos. Also, from a video clip MCP of atemplate instance, the application can extract one or more video clipsto include in the composite presentation. Similarly, from an MCP that isa burst-mode sequence, the media compositor 125 can extract one or morestill photos of the sequence and/or one or more Ken-Burns type videoclips for one or more of the still photos of the sequence. Many otherexamples of deriving the composite-presentation MCPs from a templateinstance's MCPs exist.

In some embodiments, the media compositor generates composite mediadefinition by selecting a blueprint for the composite presentation. Insome embodiments, the blueprint describes the desired transitions,effects, edit styles (including pace of the edits), etc. Blueprint canalso specify the desired type of presentation, which can then influencethe type of MCPs included or emphasized in the composite presentation.For example, one blueprint might specify highlights as the desired typeof presentation, while another blueprint might specify retrospective asthe desired type. For highlights, the collection generator 105 or mediacompositor 125 in some embodiments selects the best MCPs that arerepresentative of the MCPs of the template instance. For retrospectives,the collection generator 105 or media compositor 125 selects in someembodiments the MCPs that are not necessarily of the whole set of MCPsof the template instance.

In some embodiments, the blueprint also determines the duration of thecomposite presentation that the media compositor 125 automaticallygenerates. In some of these embodiments, the application specifies theduration based on the amount of high-quality, unique content in thetemplate instance and the blueprint. For instance, in some embodiments,the blueprint's specified parameters (e.g., parameters specifying idealduration for the MCPs) along with the MCPs that are selected based onthe selection order, determine the desired duration of the compositepresentation. In some embodiments, the blueprint might also specifyother parameter, such as the way the extrinsic scores are computed, etc.

For a template instance, the blueprint in some embodiments is associatedwith the template of the template instance. Alternatively, orconjunctively, the blueprint in some embodiments is associated with amood that the application (e.g., the collection generator 105 or mediacompositor 125) automatically picks for the composite presentation. Insome embodiments, the mood is an adjective that describes the type ofcomposite presentation. Examples of mood include extreme, club, epic,uplifting, happy, gentle, chill, sentimental, dreamy, etc.

In some embodiments, the application 100 (e.g., the collection generator105 or media compositor 125) automatically picks the mood for acomposite presentation based on the type and/or duration of media in thetemplate instance, content analysis on this media (e.g., detection ofhigh motion video), and detected user-mood preferences. Also, in someembodiments, the application allows the mood to be modified for acomposite presentation. In some of these embodiments, the video and songcompositors 125 and 130 re-generate the composite presentation for atemplate instance after the user modifies the mood for a generatedcomposite presentation. Some embodiments allow the user to view the moodfor a template instance represented by a summary pane on the generatedUI layout. If the user modifies the mood for the represented templateinstance, the video and song compositors 125 and 130 generate thecomposite presentation for this template instance based on the userchange.

The application of some embodiments also allows the user to modify apresentation duration that the application initially computes. Forinstance, in some embodiments, the user can modify the presentationduration after being presented with a rendered composited presentation.Alternatively, or conjunctively, the application allows the user to viewand modify the presentation duration in the generated UI layout (e.g.,as part of the information provided by an instance's summary pane),without having to first view the rendered composite presentation withthis duration. Some embodiments also allow the user to modify the MCPsthat the collection generator 105 automatically selects for a templateinstance. In some embodiments, the user can modify the MCPs beforeand/or after viewing a composite presentation that the video and songcompositors 125 and 1350 generate for a template instance that thecollection generator 105 generates.

In some embodiments, the media compositor 125 includes a novelconstrained solver that generates a composite media definition byexploring different manners for combining the MCPs of a templateinstance based on (1) a set of constraints that limit the exploration ofthe solution space, and (2) metadata tags that specify contentcharacteristics (e.g., for a photo, or for ranges of frames of a video).Examples of constraints include duration constraints (e.g., ideal,minimum and maximum durations for each MCP type) and positionalconstraints (e.g., one MCP type cannot be placed next to another MCPtype).

In exploring the solution space to find an optimal solution thatsatisfies the constraint and meets one or more optimization criteria,the constrained solver in some embodiments preferentially costssolutions that use MCPs that are highly ranked in the selection order.Also, in finding the optimal solution, constrained solver in someembodiments (1) identifies different portions of the template instanceMCPs (e.g., different segments of the video clips, etc.) based on themetadata tag ranges, and (2) explores solutions based on theseidentified portions.

In some embodiments, the solver discards MCP segments from an identifiedsolution that are smaller than a certain size. The solver in someembodiments also explores whether an MCP segment in an identifiedsolution should be split into smaller segments in order to delete one ormore ranges in the middle of the segment (e.g., ranges that undesirablecontent, such as ranges with excessive camera motion, etc., and/orranges that do not have desirable content, such as ranges that docontain any faces). In some of these embodiments, the solver restartsits search for a solution after deleting smaller resulting segmentsand/or splitting MCPs into smaller segments.

In some embodiments, the media compositor also specifies Ken-Burnseffects for still photos in order to define video presentations for thestill photos. The media compositor in some embodiments specifies specialtreatments for other types of image content (such as burst-modesequences, slow-motion sequences, time-lapse sequences, etc.) thatresult in the generation of a video sequence for this type of content.By only using extracted segments of MCPs and by specifying specialtreatment effects for photos and other type of content, the mediacompositor generates MCPs for the composite presentation from the MCPsof the template instance.

In some embodiments, the media compositor provides the desired durationof the composite presentation to the song compositor, after thisduration from the selection order and/or blueprint. Based on thereceived desired duration, the song compositor then dynamically definesa composite song presentation to accompany the composite mediapresentation of the media compositor. This song compositor dynamicallydefines the song presentation to include several audio segments in aparticular sequence, and a set of edits and transitions between theaudio segments in the sequence. In some embodiments, the audio segmentsare part of one song, while in other embodiments, they can be part oftwo or more songs.

These audio segments are referred to as body segments to signify thatthey are parts of another song. In some embodiments, the song compositoralso selects an ending segment from several candidate ending segmentsfor the composite song presentation. The song compositor in some ofthese embodiments can also select a starting segment from severalstarting segments for the composite song presentation. An editor definesthe body, starting and ending segments from one or more songs by usingthe audio authoring tools of some embodiments.

To ensure that the segments are properly arranged in the composite songpresentation, the song compositor of some embodiments uses (1) insertionrules that specify how audio segments can be inserted in an audiosequence, and (2) sequence rules for ensuring that the inserted audiosegments can neighbor other segments in the sequence. In someembodiments, the insertion rules are defined by reference to audiosections to which each body segments belong. Specifically, in someembodiments, the audio segment editor associates each body segment toone section in a set of sequentially specified sections, and specifies aparticular sequential ordering of the body segments in each section. Theinsertion rules of some embodiments specify that a body segment thatbelongs to a subsequent second section cannot be inserted before a bodysegment that belong to an earlier first section. The insertion rulesalso require that body segments that belong to the same section beplaced next to each other based on their order in their respectivesection.

In some embodiments, these sequence rules are embedded in a jump tablethat has multiple rows and columns, and each body segment is associatedwith one row and one column. In some embodiments, each starting orending segment is also associated with at least one row or one column.Each jump table cell then specifies whether the two segments that areassigned to that cell's row and column are allowed to follow each otherin an order specified by the row and column assignment. An editor usesthe authoring tool of some embodiments to specify the jump table and itsattributes for the body, starting and ending segments that the editordefines. At runtime, the song compositor then uses this jump table toautomatically define a song for a duration specified by the mediacompositor.

In some embodiments, each jump table cell also specifies whether atransition is required at the transition between the two segments. Thejump table in some embodiments also specifies (1) a priority value foreach body segment and (2) an identifier for indicating whether the bodysegment can be sliced during the song compositing. In some embodiments,the song compositor inserts body segments in a presentation order basedon the segment priority values and based on a set of insertion rules,until a particular duration is reached. This duration in someembodiments is the ideal duration provided by the media compositor minusthe duration of the longest ending segment. After arranging the bodysegments, the song compositor adds an ending segment, and when the audiosequence is still shorter than the desired duration, a starting segmentif one segment is available that would not make the sequence durationexceed the desired duration.

In some embodiments, the media compositor 125 and song compositor 130have several novel interactions. The first is the media compositorautomatically generates a desired presentation duration, and the songcompositor dynamically generates a definition of a composite songpresentation based on this duration, as described above. Another novelinteraction is that in some embodiments the song compositor provides thelocation of the ending segment, and/or location of a stinger in theending segment, to the media compositor so that the media compositor canalign the start of the last video or image segment with the endingsegment or stinger in this segment. In some embodiments, the video andsong compositors also synchronize fade-out effects that they apply totheir respective presentations with each other.

Also, in some embodiments, the media compositor performs post-processingto align edit points in the composite media to certain audiblydiscernable transition locations in the composite song. These locationsin some embodiments include location of beats, locations of onsets,locations of segment boundaries, and location of ending-segment stingerin the composite definition. An audio onset corresponds to the beginningof a musical note at which the amplitude rises from zero to a peak. Abeat is the rhythmic movement at which the song is played. An endingsegment stinger is a short piece of music in the ending segment thatsignifies the start of the end of the ending segment.

In some embodiments, the media compositor directs the song compositor toidentify one or more audibly discernable transition locations in thecomposite song near a particular time in the presentation. In some ofthese embodiments, the song compositor returns (1) a list of suchlocation that are near the particular time, and (2) a priority for eachof these locations. The media compositor then uses this list oftransitions to align an edit point in the composite media's definitionto a transition location based the specified priority value(s) and thedegree to which the media edit has to be moved to reach the transitionlocation.

After the media compositor generates a definition of the composite mediapresentation, and the song compositor generates a definition of thecomposite song presentation, these modules store the generated media andsong presentation definitions respectively in the media and songdefinition storages 160 and 165. Some embodiments use one storage (e.g.,one file) to store both of these definitions. From the storages 160 and165, the rendering engine 135 retrieves the media and song presentationdefinitions and generates a rendered composite presentation from thesedefinitions. In some embodiments, the rendering engine 135 stores therendered composite presentation in a file that it stores on the device,or outputs the rendered composite presentation to a frame buffer of thedevice for display.

One of ordinary skill will realize that the application 100 in otherembodiments operates differently than described above. For instance,instead of defining the composite presentation for a template instanceafter a user selects the summary pane for the template instance in theUI layout, the application of some embodiments defines the compositepresentation before the UI layout is generated. In some of theseembodiments, the application generates a score for each definedcomposite presentation, and then uses the generated scores for all ofthe defined composite presentations to define and arrange the UI layout.For instance, in some embodiments, the application uses the generatedcomposite-presentation scores to identify the subset of compositepresentations that should initially be concurrently represented on theUI layout, and to identify the order of summary panes for thesecomposite presentations on the UI layout. Alternatively, someembodiments render the composite presentations before generating the UIlayout. Still other embodiments define a portion of a compositepresentation before the UI layout is generated, and then generate therest of the definition of the composite presentation after the UI layoutis generated.

The operation of the application 100 will now be described by referenceto a process 400 of FIG. 4. The sequence of the operations of theprocess 400 just presents one manner that the modules of thisapplication operate in some embodiments. One of ordinary skill willrealize that, as described above and further below, other embodimentshave these modules perform these operations in a different sequence,and/or have some of the operations performed by other modules. As such,the description of process 400 is meant to provide only one exemplarymanner for implementing some embodiments of the invention.

The process 400 starts by the collection generator 105 defining and/orupdating template instances that group MCPs based on their similarattributes. As mentioned above, the collection generator 105 in someembodiments uses one or more media grouping templates (templates) in thetemplate storage 145 to associate the MCPs stored in the media contentstorage 140 with one or more template instances. In some embodiments,the generator 105 also tries to associate MCPs stored remotely (e.g., onremote storages of other devices) with one or more template instances.

As further described in the above-incorporated patent application, thecollection generator 105 compares a template's attribute set with thecontent and/or metadata of the MCPs in order to identify MCPs that matchthe template attributes. After identifying the MCP collection for atemplate instance, the collection generator 105 discards undesirableMCPs from a template instance. Undesirable MCPs include poor qualityMCPs (e.g., MCPs with too much camera motion, etc.), uninteresting MCPs(e.g., pictures of receipts, screenshot photos, etc.), and duplicativeor nearly duplicative MCPs. Duplicative MCPs (e.g., multiple nearlyidentical or very similar photos) often do not lead to an interestingcomposite presentation. However, in some cases, duplicative MCPs (e.g.,photos from a burst-mode sequence) are not filtered. Also, in someembodiments, some or all of the undesirable MCPs (e.g., theuninteresting MCPs, or the MCPs with poor image characteristics) arefiltered out before the collection generator 105 defines the templateinstances.

Next, at 410, the process 400 has the scoring engine 120 generate ascore for each template instance that is defined or updated at 405. Indifferent embodiments, the scoring engine 120 generates the scores forthe template instances differently. In some embodiments, a templateinstance's score is a weighted combination (e.g., weighted sum) of (1) acontextual score that is based on contextual attributes relating to thetime at which the UI layout is being generated and/or displayed, (2) aquality score that quantifies the quality of the MCPs of the templateinstance, and (3) a quantity score that quantifies the quantity of theMCPs of the template instance. The computation of these scores wasdescribed above, and is further described in the above-incorporatedpatent application.

At 415, the process 400 defines a title and selects one or morethumbnails for each defined or updated template instance. Someembodiments use the title and thumbnail(s) for the template instance'ssummary pane in the generated UI layout. In some embodiments, the layoutgenerator 110 derives a template instance's title from the attribute set(e.g., MCP metadata such as location, or MCP content such as smiles,etc.) of the instance. Also, in some embodiments, the layout generatorderives the instance's thumbnails from one or more of the better qualityMCPs of the instance. Some embodiments compute a score that quantifiesthe intrinsic quality of an MCP as further described in theabove-incorporated patent application.

Next, at 420, the layout generator 110 in some embodiments generates UIlayouts that identify the defined template instances as MCP groups forwhich the application can display composite presentations (e.g., videopresentations). At any given time, the layout generator 110 of someembodiments generates a UI layout that identifies a subset of thedefined template instance that would be contextually relevant to a userof the device at that time.

To arrange the template instance summary panes in the UI layout in acontextually relevant manner, the layout generator 110 in someembodiments uses the template instance scores computed at 410. Forinstance, in some embodiments, the layout generator 110 uses thecomputed template instance scores (1) to sort the template instances,(2) to show the contextually most relevant template instances in thefeatured, first display section 210 of the UI layout, and (3) toidentify the template instances that are to be initially displayed ineach template category in the second display section 215 of the UIlayout.

In some embodiments, the contextually most relevant template instancesfor the first display section are the template instances that have thehighest composite computed score (e.g., are the template instances withthe highest weighted sum score computed from the composite score,quality score, and quantity score). The template instances that are theninitially displayed for each template category are the templateinstances that are highest composite scoring template instances in theircategory that are not displayed in the first display section.

Other embodiments use the computed scores in a different manner todefine the arrangement of the summary panes in the UI layout. Forinstance, in some embodiments, the contextual and quality scores areused to identify the arrangement of summary panes in the first displaysection 210, while the quality and quantity scores are used to identifythe arrangement of the initially displayed summary panes in the seconddisplay section 215. Other embodiments use these or other scores inother manners to define the UI layout.

At 425, a user selects a summary pane for a template instance. Inresponse, the layout generator in some embodiments directs (at 425) themedia compositor 125 to generate, for the selected template instance,the definition of the composite presentation. In some embodiments, themedia compositor 125 generates the definition of the composite mediapresentation from the MCPs of the template instance, while directing thesong compositor to generate the definition of the associated compositesong presentation.

To generate the definition of the media composite presentation, themedia compositor 125 automatically picks (at 425) the mood for thecomposite presentation based on the type and/or duration of media in thetemplate instance, content analysis on this media (e.g., detection ofhigh motion video), and detected user-mood preferences. After pickingthe mood, the media compositor picks (at 425) a blueprint for thecomposite presentation based on the selected mood. As described above,the blueprint in some embodiments describes the desired transitions,effects, edit styles (including pace of the edits), the desired type ofpresentation, etc.

At 425, the media compositor defines the selection order for selectingthe MCPs of the selected template instance. As described above andfurther described in the above-incorporated patent application, themedia compositor defines the selection order by having the scoringengine compute extrinsic scores that quantify the time-and-differencedistance values between the MCPs of the template instance.

Next, at 430, the media compositor computes a desired duration for thecomposite presentation based on the selection order and the blue print.For instance, the video-compositor of some embodiments selects a subsetof the MCPs of the template instance up to the position in the selectionorder where two successive MCPs are within a certain time-and-differencedistance of each other (e.g., within 0.25 unit time-and-differencedistance of each other). In conjunction with the blueprint, whichspecifies the type of desired edits (e.g., fast transition edits, orslow transition edits), the selection of the subset of MCPs based on theselection order, allows the media compositor to automatically define theduration of the composite presentation without any user input.

For instance, some embodiments compute the duration as the sum of theideal duration of each MCP in the subset of selected MCPs. In someembodiments, each MCP has an MCP type, and the MCP's ideal duration isthe ideal duration that is defined by its type. In some of theseembodiments, the ideal duration for an MCP type is adjusted based on theblueprint that is selected. Other embodiments automatically define theduration of the composite presentation differently. For instance, insome embodiments, the media compositor does not account for theblueprint in computing the desired duration, and just computes thedesired duration of the composite presentation based on the subset ofMCPs that it picked by using the selection order.

After computing (at 430) the desired duration of the compositepresentation, the media compositor 125 in some embodiments (at 435)provides this duration to the song compositor 130 and directs thiscompositor to dynamically generate the definition of a song presentationthat has this duration. As mentioned above, and further described below,the song compositor generates this definition by exploring differentcombinations of body segments from one or more songs, along withdifferent possible starting and ending segments.

Next, at 435, the media compositor dynamically generates the definitionof a media presentation that has the desired duration. As mentionedabove, the media compositor 125 uses a constrained solver that generatesa composite media definition by exploring different manners forcombining the MCPs of a template instance based on (1) a set ofconstraints that limit the exploration of the solution space, and (2)metadata tags that specify content characteristics (e.g., for a photo,or for ranges of frames of a video).

In exploring the solution space to find an optimal solution thatsatisfies the constraint and meets one or more optimization criteria,the constrained solver in some embodiments (1) identifies differentportions of the template instance MCPs (e.g., different segments of thevideo clips, etc.) based on the metadata tag ranges, and (2) exploressolutions based on these identified portions. Also, the media compositorspecifies Ken-Burns effects and other special treatments for stillphotos and other MCPs in order to generate aesthetically pleasing mediapresentations.

At 435, the video and song compositor 125 and 130 have severalinteractions in order to synchronize the defined media and songpresentations. For instance, as mentioned above, the media compositorobtains the location of the ending segment, and/or the stinger in thisending segment, from the song compositor in order to align the start ofthe last video or image segment with this ending segment or stinger.Also, in some embodiments, the media compositor obtains from the songcompositor the location of any fade-out effect that the song compositoris defining for the end of the song presentation, so that the mediacompositor can synchronize its video fade-out effect with the audio fadeout. In some embodiments, the media compositor can also obtain from thesong compositor one or more audibly discernable transition location thatare near a particular time in the presentation, so that the mediacompositor can roll a video edit at this time to coincide with one ofobtained locations.

After the video and song compositors generate the definitions for themedia and song presentations, the rendering engine 135 generates (at440) a rendered composite presentation from these definitions. In someembodiments, the rendering engine 135 outputs the rendered compositepresentation to a frame buffer of the device for display. In otherembodiments, the rendering engine can store the rendered compositepresentation in a file that it stores on the device.

Before or after viewing the composite presentation, the applicationallows a user to modify the composite presentation. For instance, insome embodiments, the user can modify the duration or mood of thecomposite presentation. Some embodiments also allow the user to changethe song that is used for the composite presentation. Similarly, someembodiments allow the user to change the MCPs (e.g., add or delete MCPs)that are used for the composite presentation.

FIG. 5 illustrates how the UI of the application of some embodimentrepresents the machine-selected mood and the machine-generated durationof the composite presentation, and how this UI allows the user to changethis presentation and duration. This example is illustrated in fouroperational stages 502-508 of the mobile device 100. Each of thesestages shows a page 500 that displays a viewer 510 in which thecomposite presentation can be played. This application illustrates thispage 500 after finishing a full-screen display of the compositepresentation or after the user stops the full-screen compositepresentation display. In some embodiments, the user has to select theviewer (e.g., by tapping it) to start a full screen display of thepresentation again, or to start a display of this presentation just inthe viewer's window.

Each stage also shows a mood slider 515 and a duration slider 520. Eachslider lists a number of candidate slider values that can scroll leftand right across the screen in a sliding direction when the userperforms a drag operation on the slider. The mood slider lists severalmood values (e.g., Happy, Epic, Chill, Gentle, Sentimental, etc.), whilethe duration slider lists several durations (e.g., 30 seconds, 45seconds, 60 seconds, etc.).

The first stage 502 shows the user performing a drag operation on themood slider 515. This stage also shows the machine-selected mood for thecomposite presentation is happy. The second stage 504 shows the userselecting the Epic mood in order to change the mood of the compositepresentation from Happy to Epic. The third stage 506 shows that thepresentation mood has been changed to Epic.

The third stage 506 also shows the user performing a drag operation onthe duration slider 520. This stage also shows the machine-definedduration for the composite presentation is 30 seconds. The fourth stage508 shows the user selecting a 60 second duration in order to change theduration of the composite presentation from 30 seconds to 60 seconds.The fourth stage 508 also shows that the presentation duration has beenchanged to 60 seconds.

FIG. 6 illustrates how the UI of the application allows the user tochange the content that the application automatically picks for thecomposite presentation. This example is illustrated in five operationalstages 602-610 of the mobile device 100. The first stage 602 is similarto the first stage 502 of FIG. 5 in that it displays page 500 with theviewer 510, the mood slider 515 and the duration slider 520. This pagealso includes an Edit control 605. The first stage shows the user'sselection of this control.

The second stage 604 shows that in response to the selection of the Editcontrol 605, the application displays several edit controls, such as (1)a transition control 650 for modifying one or more machined selectedtransitions in the composite presentation, (2) a music control 655 formodifying the song that is used to automatically generate a song for thecomposite presentation, (3) an effects control 660 for modifying one ormore machined specified effects for the composite presentation, (4) atitle control 665 for modifying one or more machine-generated titles forthe composite presentation, and (5) a content control 670 for adding orremoving MCPs automatically selected for the composite presentations.

Selection of any of these controls would direct the application topresent one or more additional controls for effectuating the operationassociated with the selected control. In the example illustrated in FIG.6, the selected control is the content control 670, which is selected inthe second stage 604.

The third stage 606 shows that the selection of the content control 670directs the application to present a page 630 that displays a list ofMCPs that the user can select to add or remove MCPs from the compositepresentation. On this page, some embodiments display the MCPs that arealready included in the composite presentation differently (e.g., with adifferent shade or with a designation on top) than the MCPs that are notalready included in the presentation.

The third stage 606 also shows the user selecting a thumbnail of a videoclip 635 for addition to the composite presentation. The fourth andfifth stages 608 and 610 then show the composite presentation playing inthe viewer 510. As shown in the fifth stage, the composite presentationnow includes content from the selected video clip 635.

FIG. 7 illustrates an authoring process 700 for dividing a song intomultiple body segments, one or more starting segments and one or moreending segments. In some embodiments, an editor performs this authoringprocess 700 before the song compositor uses these segments todynamically create a song presentation for a particular durationrequested by the media compositor. The editor performs this process byusing an authoring tool. FIG. 8 illustrates multiple operational stagesof a user interface 800 of an authoring application of some embodiments.The process 700 will be described below by reference to this userinterface.

As shown in FIG. 7, the process 700 starts when the editor selects (at705) a song. The first stage 802 of FIG. 8 illustrates the userselecting Song 1 from a list 805 through a cursor click operation. Inthis example, the user interacts with the UI through a cursor andkeyboard, but in other embodiments, the editor interacts with theauthoring tool through touch input. The second stage 804 of FIG. 8illustrates the selected song in a timeline 810. At 710, the editor usesa trim tool of the authoring application to divide the selected songinto a number of segments. The second stage 804 shows the selection of atrim tool 820, while the third stage 806 illustrates multiple segmentsin the timeline after the trim tool has been used to divide the selectedsongs into these segments.

To ensure that the segments are properly arranged in the composite songpresentation, two different sets of rules are used in some embodiments.These rules are insertion rules for inserting audio segments in thesequence, and sequence rules for ensuring that the inserted audiosegments can neighbor other segments in the sequence. In someembodiments, these sequence rules are embedded in a jump table, whichwill be further described below. Some embodiments define the insertionrules by reference to the names that are assigned to the song segments.For instance, in some embodiments, each song segment has a number and aletter assigned to it. The number defines the segment's section number,while the letter is the segment identifier in the section. In theseembodiments, the song compositor can place a first audio segment beforea second audio segment only if the first audio segment has a sectionnumber that is the same or smaller than the second audio segment.

Given such insertion rules, the process 700 names (at 715) the songsegments that it defines at 710. The third stage 806 shows that afterthe selected song is divided into several segments, a field 830 opens upbelow each song segment. An editor can insert the segment's name in itsassociated field. The fourth stage 808 shows the segment names (1 a, 1b, 1 c, 2 a, 2 b, 3 a, 3 b, 3 c) filled in their corresponding fields.As shown in this example by segments 1 b, 1 c, 3 a and 3 b, the segmentsdo not need to be sequentially numbered based on their initial positionin the selected song.

Next, at 715, the editor inserts (at 720) one or more markers in thedefined sections to identify location of audibly discernable transitions(e.g., beats). After 720, the process defines (at 725) transition,starting and ending segments. As mentioned above, these segments aresegments that the song compositor can optionally add to a compositepresentation in some embodiments. In other embodiments, one or moretransition, starting and/or ending segments are required. For instance,in some embodiments, a composite song segment has to include an endingsegment, while it could optionally include a starting segment.

As further described below, the jump table in some embodiments allowsthe editor to specify whether a transition segment is required when onesegment follows another. In some embodiments, transition, starting andending segments are segments that the editor defines based on portionsthat the editor extracts from the selected song. In other embodiments,one or more of these segments (e.g., transition segments) are defined byreference to special effects or pre-defined audio content of theauthoring tool.

At 720, the editor in some embodiments also specifies one or moremarkers in the defined starting and ending sections in order to identifylocations of audibly discernable transitions. The media compositor canthen align an edit point in the composite media presentation with onesuch identified location in a starting or ending section. One example ofsuch a location is the location of a stinger in an ending segment. Insome embodiments, the authoring tool allows the editor to specify apriority for each audibly discernable location that the editorassociates with marker in a body, starting, or ending segment. The mediacompositor then uses the priority values of the transition locations toselect one transition location to align with one of its edit points.

After 720, the process 700 ends.

As shown in FIG. 8, the UI 800 of this application includes a control855 for creating a jump table for the audio segments that the editordefines. FIG. 9 illustrates that the selection of this control 855directs the authoring application to generate and display a jump table900 with multiple rows and columns. FIG. 10 illustrates this jump table900 with more detail. As shown, each audio segment is associated withone row and one column.

As shown in FIG. 10, each jump table cell has a Boolean identifier thatspecifies whether the two segments that are assigned to that cell's rowand column are allowed to follow each other in an order specified by therow and column assignment. In some embodiments, the audio segmentsdefined along the columns are the segments that follow the segments thatare defined along the rows. The Boolean identifiers of the cells of thejump table collectively define the sequence rules that specify whethertwo audio segments can be neighboring segments in the composite songpresentation that is defined by the song compositor. In someembodiments, each jump table cell can also have three other parameters,which are a transition parameter, a fade-in parameter, and a fade-outparameter. The transition parameter specifies an optional transitionbetween the two segments of the cell, while the fade-out and fade-inparameters specify how the cell's row audio segment should fade-out andthe cell's column audio segment should fade-in.

As further shown in FIG. 10, the jump table also specifies (1) apriority value for each body segment and (2) an identifier forindicating whether the body segment can be sliced during the songcompositing. For each body segment, the jump table also specifies thenumber of bars in the segment. This number is used in some embodimentsto predict locations of beats in the segment. In the jump table, thestarting segment I is associated with one rows, while each endingsegment is associated with a column. These associations of the startingand ending sections allow the jump table to correlate the body segmentswith one or more starting and ending segments to specify whether thestarting segments can precede the body segments and the ending segmentscan follow the body segments.

FIG. 11 conceptually illustrates a process 1100 that defines a jumptable of the authoring application of FIG. 8. This process startswhenever the editor selects the jump-table creation control 855 in someembodiments. As shown, this process initially displays a jump table thatassociates each body segment with a row and a column, associates eachstarting segment with a row and associates each ending segment with acolumn.

The process then performs a series of operations that are conceptuallyillustrated as operations 1110-1135 in order to populate the jump tablewith the attributes and relationships of the body, starting and endingsections. One of ordinary will realize that the order of the operationsin FIG. 11 is arbitrary, as the editor can perform these operations inany order until the jump table is populated. Also, in the exampleillustrated in this figure, each operation defines one attribute or oneset of relationships completely. Again, one of ordinary skill willrealize that the editor can jump around between these operations todefine different instances of the attributes and relationships atdifferent times.

At 1110, the editor defines the priority for each body segment in thesegment column of the jump table. As further described below, thepriority values of body segments are used in some embodiments to specifyan order for the body segments that is used to step through the bodysegments to determine whether they are viable candidate for insertioninto the audio sequence based on their duration. The priority values arealso used to identify the body segment to remove when two body segmentsare inserted into the audio sequence in violation of a sequencing rule.

At 1115, the editor specifies in the jump table the divisible indicatorthat specifies whether each body segment is divisible (i.e., sliceable)into smaller sections. In some embodiments, the jump table alsospecifies whether an ending segment can be divided into smallersections. When the song compositor cannot composite a song of a desiredduration by using the full body segments, the song compositor in someembodiments tries to determines whether any of the body segments isdivisible and if so, tries to add one or more of the parts of the bodysegments to the song in order to create a song of the desired duration.The song compositor uses the divisible indicator to determine whether itcan slice the body segments into smaller pieces.

At 1120, the editor specifies the number of bars in each body segment.In some embodiments, the song compositor uses a body segment's number ofbars to compute a predicted location of a beat in the body segment. Asfurther described below, the song compositor uses the beat location whenit needs to compile for the media compositor a list of audiblydiscernable transition locations that are near a given time.

At 1125 and 1130, the editor specifies the attributes of each jump tablecell that is associated with a body segment and another body segment, astarting segment or an ending segment. As mentioned above, each suchcell has four attributes, which are (1) a Boolean indicator specifyingthe propriety of whether the row-associated segment can precede thecolumn-associated segment, (2) a transition indicator specifying whethera transition needs to be defined between these two segments, and (3)fade-in and fade-out parameters specifying how the column-associatedsegment should fade-in and how the row-associated segment shouldfade-out. In some embodiments, the transition indicator includes atransition identifier that identifies a particular transition fromseveral pre-defined and/or editor-defined transitions.

At 1135, the process exports the data embedded in the jump table to adata structure that is used by the song compositor at runtime. In someembodiments, this data structure is a JSON (Javascript Object Notation)file. In some embodiments, the process associates the exportedjump-table data structure (e.g., JSON file) with the song from which thesong segments need to be extracted. In other embodiments, the processassociates the jump-table data structure with the extracted songsegments, e.g., places the JSON file and the song segments in anotherfile. The song compositor imports the jump-table data structure (e.g.,JSON file) whenever it wants to dynamically composite a song. One ormore editors perform the processes 700 and 1100 of FIGS. 7 and 11multiple times to create multiple sets of song segments and multiplejump-table data structures (e.g., multiple JSON files) for multiplesongs.

In some embodiments, the jump-table data structure or a parent structure(e.g., a file that contains the JSON file and its associated set of songsegments) is associated with a mood, and the song compositor selects thedata structure whenever it wants to dynamically composite a song forthat mood. Different jump-table data structures can be associated withdifferent moods. In some embodiments, one jump-table data structure canbe associated with multiple moods. Alternatively, some embodimentsassociate one or more moods with a song, and associate the song with ajump-table data structure and the song segments extracted from thesongs.

FIG. 12 illustrates the song compositor 130 of some embodiments. Asshown, this song compositor includes a sequence generator 1205, asegment sorter 1210, and a sequence validator 1215. The sequencegenerator 1205 serves as the coordinating module of the song compositorin some embodiments. From the media compositor 125, the sequencegenerator 1205 receives the desired duration and mood for a song thatthe song compositor needs to dynamically generate without user input.

Based on the received mood, the sequence generator selects a jump-tablefile and its associated set audio segments that are associated with thereceived mood. Based on this file, the sequence creates a runtimeversion of the jump table 1220, which it, the segment sorter 1210 andsequence validator 1215 use. The sequence generator next directs thesegment sorter to define a sorted order for the selected set of audiosegments. In response, the segment sorter uses the segment priorityvalues of the jump table 1220 to generate the segment order 1225. Thisorder lists the audio segments from the highest priority segment to thelowest priority segment.

The sequence generator then defines an audio sequence based on thesorted order 1225 and the insertion rules. In some embodiments, thisaudio sequence is a sequence of just body segments. Also, in someembodiments, the sequence generator defines the duration of this audiosequence as the received desired duration minus the duration of thelongest ending segment in the selected song segment set. The sequencegenerator iteratively inserts body segments into the audio sequence bystepping through the body segments based on their priority values (i.e.,based on the sorted order 1225). As further described below by referenceto FIGS. 13-15, the insertion rules that the sequence generator uses asit inserts the body segments in some embodiments, specify (1) that abody segment that belongs to a subsequent second section cannot beinserted before a body segment that belong to an earlier first section,and (2) that body segments that belong to the same section be placednext to each other based on their order in their respective section.

After creating a candidate audio sequence 1235, the sequence generator1205 then directs the sequence validator 1215 to use the sequence rulesof the jump table 1220 to validate the body segment arrangement in theaudio sequence. This validation entails ensuring that the placement ofno two neighboring segments in the audio sequence violates a sequencerule specified in the jump table. When the validator 1215 detect aneighboring segment pair that violates a sequence rule, the validatorremoves the segment with the lower priority to cure the violation.

When the validator removes one or more segments to cure one or moresequence-rule violations, the sequence generator 1205 again tries toinsert body segments in the audio sequence. In such situations, thesequence generator resumes on the sorted order at the position where itleft off in its previous iteration. When the sequence generatoridentifies an audio sequence that does not violate any sequence rule(based on the sequence validator's assessment), the sequence generatoradds an ending segment from the segment set 1230. In some embodiments,the sequence generator adds the longest ending segment that iscompatible with the last body segment in the defined audio sequence. Ifthe audio sequence duration is less than the received desired durationat this stage and the segment set includes a starting segment that iscompatible with the first song segment of the sequence, the sequencegenerator adds this starting segment at the start of the audio sequence.When multiple starting segments are viable, the sequence generatorselects the starting segment with the longest duration that does notcause the audio sequence to exceed the desired duration.

FIG. 13 illustrates a process 1300 that the song compositor of FIG. 12performs in some embodiments to dynamically composite a songpresentation. This process starts each time the media compositor directsthe song compositor to generate a song presentation of a particularduration. As shown, the process 1300 receives (at 1305) the desiredduration and a mood for the desired song presentation, form the mediacompositor.

Based on the received mood, the process selects (at 1310) a song fromwhich it should dynamically generate the song presentation. In someembodiments, at 1310, the process selects a jump-table file and itsassociated set segments that are associated with the received mood. Theset of segments include body, starting and ending segments in someembodiments. Next, at 1315, the process sorts the song segmentsaccording to their priority values, which are specified in thejump-table file. In this sort, the song segments that have higherpriority values are arranged before the song segments with lowerpriority values.

At 1320, the process computes an adjusted duration by subtracting theduration of the longest ending segment from the ideal duration receivedat 1305. The process uses the adjusted duration to compute a sequence ofone or more body segments and any needed transitions between them. Theprocess subtracts the duration of the longest ending segment in order toensure that there is sufficient time to include an ending segment at theend of the composite song presentation. Other embodiments do not requirethe composite song presentation to have an ending segment, and in theseembodiments, the process does not compute an adjusted duration, andinstead uses the received duration to identify the composite songpresentation.

Next, at 1325, the process iteratively inserts body segments into apresentation sequence based on the sorted order defined at 1315. In someof these embodiments, the process steps through the sorted order (andloops back when it reaches the end of the sorted order) to examineviability for inserting the body segments at successive locations in thedefined audio sequence. In stepping through this order, the processexamines the viability for insertion of a body segment based on theremaining duration of the presentation and the length of the bodysegment.

Also, when the process determines that a body segment can be inserted inthe audio sequence, the process inserts the body segment in a locationin the audio sequence that comports with the insertion rules. Forinstance, in some embodiments, the process inserts a body segment thatbelongs to a subsequent second section after a body segment that belongto an earlier first section. Also, when placing multiple body segmentsthat belong to the same section, the process places the body segmentsbased on their order in their respective section, e.g., when arrangingsegments 1A-1C, the process first places 1A, then 1B, and the 1C.However, when inserting one body segment several times in the audiosequence, the process will place the subsequent instances of the bodysegment after body segments are later in the segment order so that thesegments can loop. For example, when inserting segment 1A afterpreviously inserting segments 1A-1C, the process inserts 1A after 1C, sothat the audio sequence is expressed as 1A, 1B, 1C, 1A.

In some embodiments, the process insert body segments into the audiosequence until the sequence has reached the adjusted duration, or untilthe process has exhausted choices. To explore all the choices, theprocess 1300 in some embodiments explores adding sliced portions of thesliceable body segments, when it cannot obtain an audio sequence withthe adjusted duration by just adding body segments. The operation 1325of the process 1300 will be further described below by reference to FIG.14.

At 1330, the process determines whether any of the body segments in thedefined audio sequence violate the sequence rules specified in the jumptable. In some embodiments, the process 1300 generates a runtime jumptable from the jump-table definition in the jump-table file. The processuses this jump table to determine whether any pair of neighboring bodysegments in the audio sequence violates a sequence prohibition as setout in the jump table. If so, the process removes (at 1335) the lowerpriority body segment of the pair. In some cases, multiple neighboringpairs might violate sequence prohibition(s). In such a case, the processtries to identify (at 1335) the lowest priority body segment that uponremoval can rectify multiple violations. In other embodiments, theprocess does not try to identify such body segments, and instead simplysolves the neighboring pair violations one pair at a time, by analyzingthe violating pairs in a particular order (e.g., from start to end ofthe audio sequence).

After removing (at 1335) one or more body segments from the definedaudio sequence, the process returns to 1325 to try to insert bodysegments again in the song presentation. When the process returns to1325, the process resumes on the sorted order at the position where itleft off in its previous iteration through 1325 before its lasttransition to 1330.

When the process 1300 determines (at 1330) that the defined audiosequence does not violate any sequence rule, the process adds (at 1340)one of the ending segments to the audio sequence. In some embodiments,the process 1300 selects the longest ending segment that is compatiblewith the last body segment in the defined audio sequence. Lastly, at1345, the process determines whether the defined audio sequence is stillshorter than the received ideal duration. If so, the process determines(at 1345) whether any of the starting segments can make the audiosequence reach the ideal duration or get as close as possible. To dothis, the starting segment cannot conflict with the first body segmentin the audio sequence. When multiple starting segments are viable, theprocess selects the starting segment with the longest duration that doesnot cause the audio sequence to exceed the desired duration. After 1345,the process ends.

FIG. 14 illustrates a process 1400 that the process 1300 performs at1325. As shown, the process selects (at 1405) a segment based on thesegment priority values. The first time through 1405, the process 1400selects the body segment that is first on the priority-sorted orderdefined at 1315. Each subsequent time through 1405, the process selectsthe body segment in the sorted order that is after the last body segmentthat the process selected from the sorted order in its last iterationthrough 1405.

After selecting a body segment (at 1405), the process determines (at1410) whether the addition of the selected body segment to the audiosequence would make the sequence's duration match the adjusted durationcomputed at 1320. In some embodiments, the process accounts for durationof any transition that would have to be defined by placing the selectedbody segment next to the prior segment, whenever it assesses what theduration of the sequence would be upon the addition of a potentialcandidate segment at 1410 or 1420. Whether such a transition is neededis defined in the jump table. In some embodiments, some or all of thetransitions are not added to the audio sequence in a way that wouldincrease the sequence's overall duration, as such a transition would beapplied to the end of the previous segment and/or the start of the nextsegment.

When the process determines (at 1410) that the addition of the selectedbody segment to the audio sequence would make the sequence's durationmatch the adjusted duration, the process adds (at 1415) the selectedbody segment to the audio sequence in a location in the audio sequencethat comports with the insertion rules. For instance, in someembodiments, the process inserts a body segment that belongs to asubsequent second section after a body segment that belongs to anearlier first section. Also, when placing multiple body segments thatbelong to the same section, the process places the body segments basedon their order in their respective section. For example, when arrangingsegments 1A-1C, the process first places 1A, then 1B, and the 1C.However, when inserting one body segment several times in the audiosequence, the process will place the subsequent instances of the bodysegment after body segments are later in the segment order so that thesegments can loop. For example, when inserting segment 1A afterpreviously inserting segments 1A-1C, the process inserts 1A after 1C, sothat the audio sequence is expressed as 1A, 1B, 1C, 1A. After 1415, theprocess ends.

When the process determines (at 1410) that the addition of the selectedbody segment to the audio sequence would not make the sequence'sduration match the adjusted duration, the process determines (at 1415)whether the addition of the selected body segment to the defined audiosequence would cause the audio sequence to exceed the adjusted duration.When no body segment has been added to the audio sequence, the processdetermines whether the duration of the selected body segment exceeds theadjusted duration. When one or more body segments have been previouslyadded to the audio sequence, the process determines (at 1410) whetherthe length of the selected body segment exceeds the adjusted durationminus the duration of body segments currently assigned to the audiosequence.

When the process determines (at 1420) that the addition of the selectedbody segment to the defined audio sequence would not cause the audiosequence to exceed the adjusted duration, the process adds (at 1425) theselected body segment to the audio sequence in a location in the audiosequence that comports with the insertion rules, as described above.After 1425, the process returns to 1405 to select another body segment.

When the process determines (at 1420) that the addition of the selectedbody segment to the defined audio sequence would cause the audiosequence to exceed the adjusted duration, the process determines (at1430) whether it has completed one loop through the sorted order in thisiteration through operation 1325. If not, the process returns to 1405 toselect the next body segment based on the sorted order.

When the process determines (at 1430) that it has explored all bodysegments in this iteration through 1325, the process determines (at1435) whether any body segments are designated as sliceable. If not, theprocess ends. Otherwise, the process explores (at 1440) adding portionsof the divisible body segments to the audio sequence. In someembodiment, the process identifies portions of the body segment based onhow an editor has marked up the divisible sections of the body segmentand/or based on the bar data associated with the body segment.

In some embodiments, the operations for adding the body segment portionsare similar to the operations 1405-1430 for adding the body segments tothe audio sequence. Thus, the process explores the body segment portionsbased on the priority values of their associated body segments. Whileinserting a body segment portion in the audio sequence, the processfollows the above-described insertion rules in some embodiments. Theprocess tries to add body segment portions until the addition of onebody segment portion causes the audio sequence to reach the adjustedduration, or until all body segment portions have been explored. After1440, the process ends.

FIG. 15 illustrates an example of the operation of the sequencegenerator 1205 and the sequence validator 1215. This example isillustrated in three operational stages 1502-1506, with the first andthird stages 1502 and 1506 relating to the operation of the sequencegenerator 1205 and the second stage 1504 relating to the operation ofthe sequence validator 1215. In this example, the song segment setincludes eight segments 1A, 1B, 1C, 2A, 2B, 2C, 3A and 3B. The durationand priority of these song segments are shown in the priority sortedtable 1510 that the segment sorter 1210 produces.

The first stage 1502 shows the sequence generator 1205 receiving thedesired duration of the song. In this example, it is assumed that thedesired duration is 1 minute 10 seconds, and the length of the longestending segment is 10 seconds. Accordingly, the sequence generator 1205steps through the body segments according to the order specified by thepriority sorted table 1510 in order to identify a body-segment sequencethat is has a maximum duration of 60 seconds.

As shown by the exploded view of the composite sequence 1235, thesequence generator steps through the priority sorted order to firstinsert body segment 1A, then body segment 1C, followed by body segment2A, and then finally by body segment 2C. Each time the sequencegenerator selects a body segment, it determines whether the length ofthis body segment exceeds the remaining duration of the body-segmentsequence that it is generating. If so, the sequence generator does notinsert the selected body segment and moves to the next body segment. Forinstance, after inserting body segment 1A, the sequence generatorselects body segment 1B since after segment 1A, segment 1B has thehighest priority. But the sequence generator does not insert segment 1Bbecause the length of the body segment sequence would then be 65seconds, which would exceed the maximum 60-second duration for thissequence.

Thus, the sequence generator inserts a selected body segment in thesequence only when this insertion would not cause the body-segmentsequence to exceed its maximum duration. When the sequence generatorinserts a selected body segment in the sequence, it inserts this segmentbased on the body segment's section number and segment letter. Becauseof the insertion rule, the sequence generator inserts body segment 1Cafter body segment 1A, then inserts body segment 2A after body segment1C, and then inserts body segment 2C after body segment 2A.

After inserting body segment 2C, the total duration of the defined audiosequence 1515 is 1 minute, which is the maximum body-segment sequenceduration. As shown in the second stage 1504, the sequence generator 1205then has the sequence validator 1215 examine the defined audio sequence1515 to determine whether any two neighboring segments violates asequence rule that is defined in the jump table.

The second stage 1504 also shows the sequence validator 1215 receivesthe jump table 1520, which includes a rule that prohibits body segment2A following body segment 1C. Thus, the sequence validator 1215 removesthe body segment 2A from the body-segment sequence 1515 to produce themodified audio sequence 1525. Since the duration of this modified audiosequence is now 40 seconds, which is 20 seconds less than the 60 seconddesired duration, the sequence generator tries to insert body segmentsin this sequence to reach the desired duration.

As shown in the third stage 1506, the sequence generator 1205 startsselecting body segments to examine for insertion in the body-segmentsequence where it left off in its previous attempt. In this example, thesequence generator 1205 left off at segment 2B. The sequence generator,however, cannot add this segment because adding this segment would causethe body-segment sequence to exceed 60 seconds. Hence, the sequencegenerator 1205 skips this segment, and then selects segment 3A. Thesequence generator adds this segment 3A to the sequence as after itsaddition, the sequence has a 45 second duration that is less than themaximum 60 second duration.

As shown by the exploded view of the composite sequence 1235 in thethird stage 1506, the sequence generator steps and loops through thepriority sorted order to then add segments 1C and 2C again to thesequence, after skipping over segments 3B, 1A, 1B, and 2A. Thesesegments are skipped over because the addition of each of these segmentswould cause the body-segment sequence to exceed its maximum duration.When segments 1C and 2C are inserted again in the body-segment sequence,they are inserted in the sequence at positions specified by theirsection number and segment letter. As such, the resulting body-segmentsequence 1535 is as follows: 1A, 1C, 1C, 2C, 2C, 3A.

Since this body-segment sequence is 60 seconds long (i.e., has thedesired maximum duration), the sequence generator has the sequencevalidator check it for sequence rule violations. If the sequencevalidator does not identify any sequence rule violations, the sequencegenerator then selects the longest ending segment that can follow bodysegment 3A, and inserts this ending segment in the audio sequence afterbody segment 3A. When the inserted ending segment is less than 10seconds long, the audio sequence is less than 70 seconds (i.e., lessthan the desired duration of the song presentation). In this situation,the sequence generator tries to identify a starting segment that canprecede segment 1A, and that has a duration that would not cause theaudio sequence to exceed its maximum duration after this startingsegment has been inserted in the audio sequence. If it identifies anysuch starting segment, the sequence generator inserts this segmentbefore all the body segments (i.e., before segment 1A in this example).When multiple starting segments exist that can precede segment 1A andthat have a duration that is equal to or less than the availableduration of the audio sequence, the sequence generator selects thelongest starting segment.

Many of the above-described features and applications are implemented assoftware processes that are specified as a set of instructions recordedon a computer readable storage medium (also referred to as computerreadable medium). When these instructions are executed by one or morecomputational or processing unit(s) (e.g., one or more processors, coresof processors, or other processing units), they cause the processingunit(s) to perform the actions indicated in the instructions. Examplesof computer readable media include, but are not limited to, CD-ROMs,flash drives, random access memory (RAM) chips, hard drives, erasableprogrammable read-only memories (EPROMs), electrically erasableprogrammable read-only memories (EEPROMs), etc. The computer readablemedia does not include carrier waves and electronic signals passingwirelessly or over wired connections.

In this specification, the term “software” is meant to include firmwareresiding in read-only memory or applications stored in magnetic storagewhich can be read into memory for processing by a processor. Also, insome embodiments, multiple software inventions can be implemented assub-parts of a larger program while remaining distinct softwareinventions. In some embodiments, multiple software inventions can alsobe implemented as separate programs. Finally, any combination ofseparate programs that together implement a software invention describedhere is within the scope of the invention. In some embodiments, thesoftware programs, when installed to operate on one or more electronicsystems, define one or more specific machine implementations thatexecute and perform the operations of the software programs.

The applications of some embodiments operate on mobile devices, such assmart phones (e.g., iPhones®) and tablets (e.g., iPads®). FIG. 16 is anexample of an architecture 1600 of such a mobile computing device.Examples of mobile computing devices include smartphones, tablets,laptops, etc. As shown, the mobile computing device 1600 includes one ormore processing units 1605, a memory interface 1610 and a peripheralsinterface 1615.

The peripherals interface 1615 is coupled to various sensors andsubsystems, including a camera subsystem 1620, a wireless communicationsubsystem(s) 1625, an audio subsystem 1630, an I/O subsystem 1635, etc.The peripherals interface 1615 enables communication between theprocessing units 1605 and various peripherals. For example, anorientation sensor 1645 (e.g., a gyroscope) and an acceleration sensor1650 (e.g., an accelerometer) is coupled to the peripherals interface1615 to facilitate orientation and acceleration functions.

The camera subsystem 1620 is coupled to one or more optical sensors 1640(e.g., a charged coupled device (CCD) optical sensor, a complementarymetal-oxide-semiconductor (CMOS) optical sensor, etc.). The camerasubsystem 1620 coupled with the optical sensors 1640 facilitates camerafunctions, such as image and/or video data capturing. The wirelesscommunication subsystem 1625 serves to facilitate communicationfunctions. In some embodiments, the wireless communication subsystem1625 includes radio frequency receivers and transmitters, and opticalreceivers and transmitters (not shown in FIG. 16). These receivers andtransmitters of some embodiments are implemented to operate over one ormore communication networks such as a GSM network, a Wi-Fi network, aBluetooth network, etc. The audio subsystem 1630 is coupled to a speakerto output audio (e.g., to output voice navigation instructions).Additionally, the audio subsystem 1630 is coupled to a microphone tofacilitate voice-enabled functions, such as voice recognition (e.g., forsearching), digital recording, etc.

The I/O subsystem 1635 involves the transfer between input/outputperipheral devices, such as a display, a touch screen, etc., and thedata bus of the processing units 1605 through the peripherals interface1615. The I/O subsystem 1635 includes a touch-screen controller 1655 andother input controllers 1660 to facilitate the transfer betweeninput/output peripheral devices and the data bus of the processing units1605. As shown, the touch-screen controller 1655 is coupled to a touchscreen 1665. The touch-screen controller 1655 detects contact andmovement on the touch screen 1665 using any of multiple touchsensitivity technologies. The other input controllers 1660 are coupledto other input/control devices, such as one or more buttons. Someembodiments include a near-touch sensitive screen and a correspondingcontroller that can detect near-touch interactions instead of or inaddition to touch interactions. Also, the input controller of someembodiments allows input through a stylus.

The memory interface 1610 is coupled to memory 1670. In someembodiments, the memory 1670 includes volatile memory (e.g., high-speedrandom access memory), non-volatile memory (e.g., flash memory), acombination of volatile and non-volatile memory, and/or any other typeof memory. As illustrated in FIG. 16, the memory 1670 stores anoperating system (OS) 1672. The OS 1672 includes instructions forhandling basic system services and for performing hardware dependenttasks.

The memory 1670 also includes communication instructions 1674 tofacilitate communicating with one or more additional devices; graphicaluser interface instructions 1676 to facilitate graphic user interfaceprocessing; image processing instructions 1678 to facilitateimage-related processing and functions; input processing instructions1680 to facilitate input-related (e.g., touch input) processes andfunctions; audio processing instructions 1682 to facilitateaudio-related processes and functions; and camera instructions 1684 tofacilitate camera-related processes and functions. The instructionsdescribed above are merely exemplary and the memory 1670 includesadditional and/or other instructions in some embodiments. For instance,the memory for a smartphone may include phone instructions to facilitatephone-related processes and functions. The above-identified instructionsneed not be implemented as separate software programs or modules.Various functions of the mobile computing device can be implemented inhardware and/or in software, including in one or more signal processingand/or application specific integrated circuits.

While the components illustrated in FIG. 16 are shown as separatecomponents, one of ordinary skill in the art will recognize that two ormore components may be integrated into one or more integrated circuits.In addition, two or more components may be coupled together by one ormore communication buses or signal lines. Also, while many of thefunctions have been described as being performed by one component, oneof ordinary skill in the art will realize that the functions describedwith respect to FIG. 16 may be split into two or more integratedcircuits.

FIG. 17 conceptually illustrates another example of an electronic system1700 with which some embodiments of the invention are implemented. Theelectronic system 1700 may be a computer (e.g., a desktop computer,personal computer, tablet computer, etc.), phone, PDA, or any other sortof electronic or computing device. Such an electronic system includesvarious types of computer readable media and interfaces for variousother types of computer readable media. Electronic system 1700 includesa bus 1705, processing unit(s) 1710, a graphics processing unit (GPU)1715, a system memory 1720, a network 1725, a read-only memory 1730, apermanent storage device 1735, input devices 1740, and output devices1745.

The bus 1705 collectively represents all system, peripheral, and chipsetbuses that communicatively connect the numerous internal devices of theelectronic system 1700. For instance, the bus 1705 communicativelyconnects the processing unit(s) 1710 with the read-only memory 1730, theGPU 1715, the system memory 1720, and the permanent storage device 1735.

From these various memory units, the processing unit(s) 1710 retrievesinstructions to execute and data to process in order to execute theprocesses of the invention. The processing unit(s) may be a singleprocessor or a multi-core processor in different embodiments. Someinstructions are passed to and executed by the GPU 1715. The GPU 1715can offload various computations or complement the image processingprovided by the processing unit(s) 1710.

The read-only-memory (ROM) 1730 stores static data and instructions thatare needed by the processing unit(s) 1710 and other modules of theelectronic system. The permanent storage device 1735, on the other hand,is a read-and-write memory device. This device is a non-volatile memoryunit that stores instructions and data even when the electronic system1700 is off. Some embodiments of the invention use a mass-storage device(such as a magnetic or optical disk and its corresponding disk drive,integrated flash memory) as the permanent storage device 1735.

Other embodiments use a removable storage device (such as a floppy disk,flash memory device, etc., and its corresponding drive) as the permanentstorage device. Like the permanent storage device 1735, the systemmemory 1720 is a read-and-write memory device. However, unlike storagedevice 1735, the system memory 1720 is a volatile read-and-write memory,such a random access memory. The system memory 1720 stores some of theinstructions and data that the processor needs at runtime. In someembodiments, the invention's processes are stored in the system memory1720, the permanent storage device 1735, and/or the read-only memory1730. For example, the various memory units include instructions forprocessing multimedia clips in accordance with some embodiments. Fromthese various memory units, the processing unit(s) 1710 retrievesinstructions to execute and data to process in order to execute theprocesses of some embodiments.

The bus 1705 also connects to the input and output devices 1740 and1745. The input devices 1740 enable the user to communicate informationand select commands to the electronic system. The input devices 1740include alphanumeric keyboards and pointing devices (also called cursorcontrol devices (e.g., mice)), cameras (e.g., webcams), microphones orsimilar devices for receiving voice commands, etc. The output devices1745 display images generated by the electronic system or otherwiseoutput data. The output devices 1745 include printers and displaydevices, such as cathode ray tubes (CRT) or liquid crystal displays(LCD), as well as speakers or similar audio output devices. Someembodiments include devices such as a touchscreen that function as bothinput and output devices.

Finally, as shown in FIG. 17, bus 1705 also couples electronic system1700 to a network 1725 through a network adapter (not shown). In thismanner, the computer can be a part of a network of computers (such as alocal area network (“LAN”), a wide area network (“WAN”), or anIntranet), or a network of networks, such as the Internet. Any or allcomponents of electronic system 1700 may be used in conjunction with theinvention.

Some embodiments include electronic components, such as microprocessors,storage and memory that store computer program instructions in amachine-readable or computer-readable medium (alternatively referred toas computer-readable storage media, machine-readable media, ormachine-readable storage media). Some examples of such computer-readablemedia include RAM, ROM, read-only compact discs (CD-ROM), recordablecompact discs (CD-R), rewritable compact discs (CD-RW), read-onlydigital versatile discs (e.g., DVD-ROM, dual-layer DVD-ROM), a varietyof recordable/rewritable DVDs (e.g., DVD-RAM, DVD-RW, DVD+RW, etc.),flash memory (e.g., SD cards, mini-SD cards, micro-SD cards, etc.),magnetic and/or solid state hard drives, read-only and recordableBlu-Ray® discs, ultra density optical discs, any other optical ormagnetic media, and floppy disks. The computer-readable media may storea computer program that is executable by at least one processing unitand includes sets of instructions for performing various operations.Examples of computer programs or computer code include machine code,such as is produced by a compiler, and files including higher-level codethat are executed by a computer, an electronic component, or amicroprocessor using an interpreter.

While the above discussion primarily refers to microprocessor ormulti-core processors that execute software, some embodiments areperformed by one or more integrated circuits, such as applicationspecific integrated circuits (ASICs) or field programmable gate arrays(FPGAs). In some embodiments, such integrated circuits executeinstructions that are stored on the circuit itself. In addition, someembodiments execute software stored in programmable logic devices(PLDs), ROM, or RAM devices.

As used in this specification and any claims of this application, theterms “computer”, “server”, “processor”, and “memory” all refer toelectronic or other technological devices. These terms exclude people orgroups of people. For the purposes of the specification, the termsdisplay or displaying means displaying on an electronic device. As usedin this specification and any claims of this application, the terms“computer readable medium,” “computer readable media,” and “machinereadable medium” are entirely restricted to tangible, physical objectsthat store information in a form that is readable by a computer. Theseterms exclude any wireless signals, wired download signals, and anyother ephemeral signals.

While the invention has been described with reference to numerousspecific details, one of ordinary skill in the art will recognize thatthe invention can be embodied in other specific forms without departingfrom the spirit of the invention. For instance, a number of the figuresconceptually illustrate processes. The specific operations of theseprocesses may not be performed in the exact order shown and described.The specific operations may not be performed in one continuous series ofoperations, and different specific operations may be performed indifferent embodiments. Furthermore, the process could be implementedusing several sub-processes, or as part of a larger macro process.

1. An audio authoring method comprising: providing a set authoring toolsfor specifying rules for combining sections of a first song to generatea second song, the set of authoring tools for: defining an array ofcells arranged in first and second directions; associating each bodysection with one set of cells that are arranged in the first directionand another set of cells that are arranged in the second direction; andat each cell intersection of the first and second directions thatbelongs to one set of cells arranged in the first direction for a firstbody section and another set of cells arranged in the second directionfor a second body section, specifying whether the second body section isallowed to follow the first body section.
 2. The method of claim 1,wherein for a subset of cells, the first and second body sections arethe same body section, and for another subset of cells, the first andsecond body sections are different body sections.
 3. The method of claim1, wherein the set of authoring tools is further for dividing the firstsong into the plurality of body sections.
 4. The method of claim 1,wherein the set of authoring tools is further for importing theplurality of body sections of the first song.
 5. The method of claim 1,wherein the set of authoring tools is further for defining, for a cell,a transition effect that specifies how the second song should transitionfrom the first body section to the second body section when the secondsong has the second body section follow the first body section.
 6. Themethod of claim 5, wherein the transition effect is defined in terms ofa fade-in parameter and a fade-out parameter.
 7. The method of claim 1,wherein the set of authoring tools is further for associating at leastone introductory section with one set of cells that are arranged in thefirst direction, the introductory section for serving as an audiosection at the start of the second song.
 8. The method of claim 1,wherein the set of authoring tools is further for associating at leastone end section with one set of cells that are arranged in the seconddirection, the end section for serving as an audio section at the end ofthe second song.
 9. The method of claim 1, wherein the set of authoringtools is further for specifying a priority value for each body sectionassociated with a set of cells arranged in the first direction, saidpriority value quantifying the desirability for including the bodysection in the second song.
 10. The method of claim 1, wherein the setof authoring tools is further for specifying a number of bars for eachbody section associated with a set of cells arranged in the firstdirection.
 11. The method of claim 10, wherein the number of bars serveas metadata for analyzing the body sections of the first song.
 12. Themethod of claim 10, wherein the number of bars of a body sectionidentify candidate locations for slicing the body section.
 13. Themethod of claim 1, wherein the set of authoring tools is further fordefining a divider identifier for each body section associated with aset of cells arranged in the first direction, said divider identifier ofa body section specifying whether the body section is breakable intosmaller sections for addition to the second song. 14-15. (canceled) 16.A method for automatically compositing a first song, the methodcomprising: receiving a plurality of song sections, and for eachparticular song section, a priority value and a set of succession rulesthat identify a set of song sections that cannot follow the particularsong section; combining the song sections based on the priority values,until a desired first-song duration is reached without exceeding theduration or until all song sections have been examined; and analyzing asequence of song sections in the combined song sections; removing anysong section that violates a succession rule, wherein the first songcomprises the remaining combined song sections
 17. The method of claim16 further comprising repeating the adding song sections and analyzingsong-section sequence until the desired duration is reached.
 18. Themethod of claim 16 further comprising repeating the adding song sectionsand analyzing song-section sequence until all song sections have beenexamined and the song-section sequence does not contain a song sectionthat violates a succession rule.
 19. The method of claim 18 furthercomprising: identifying any song section that is divisible into smallersections; based on the priority values, adding the identified smallersong sections to the combined song sections until the desired first-songduration is reached without exceeding the duration or until all smallersong sections have been examined for adding to the first song.
 20. Themethod of claim 19 further comprising: after adding the identifiedsmaller song sections, analyzing the song-section sequence to remove anysong section that violates a succession rule.
 21. The method of claim16, wherein the song sections are body sections, and the desiredfirst-song duration is a first desired duration, the method furthercomprising: receiving a second desired duration; and generating thefirst desired duration by subtracting a duration for an end section fromthe second desired duration.
 22. (canceled)
 23. The method of claim 21further comprising: adding at least one end section to the first song asa section after all of the body sections added to the first songsection; and when the first song does not exceed the second durationafter addition of the end section, adding an introductory section to thefirst song. 24-27. (canceled)